Wednesday, May 14, 2008

q used to define a quote delimiter for PL/SQL

I don't know why I can never remember the 'q' for a quote delimiter, so I am putting it here for myself so I can easily find it.



q'';

DECLARE
s1 VARCHAR2(20);
s2 VARCHAR2(20);
s3 VARCHAR2(20);
BEGIN
s1 := q'[Isn't this cool]';
s2 := q'"Isn't this cool"';
s3 := q'|Isn't this cool|';

dbms_output.put_line(s1);
dbms_output.put_line(s2);
dbms_output.put_line(s3);
END;


source: http://www.psoug.org/reference/string_func.html

2 comments:

lee woo said...

My whole mentality is that I eat what I want within moderation, and I have a little bit of everything. If you deprive yourself, you get moody and unhappy, and you have to enjoy life. See the link below for more info.


#moody
www.ufgop.org

Leslie Lim said...

You really have an awesome blog. You doing great and I really love it. Thanks for posting. God bless.

Zean
www.imarksweb.org