[SQL ] how to print sql command in oracle?

作者: airtsubasa (偽學姊)   2014-01-07 22:20:29
請問各位先進:
假設有段PL/SQL code如下:
Declare
v_dummy VARCHAR2(1);
v_a VARCHAR2(100) :='a';
v_b VARCHAR2(100) :='b';
begin
SELECT 'x'
INTO v_dummy
FROM table_a
WHERE field_a = v_a
AND field_b = v_b;
end;
想請問一下,是否有什麼方法可以把SELECT段當成String print出來嗎?
每次debug都要這樣一直串:
v_str := 'SELECT ....'||v_a||' AND field_b='||v_b;
欄位一多,整個就很囧...

Links booklink

Contact Us: admin [ a t ] ucptt.com