execute immediate quote escape oracle pl/sql
To run this via execute immediate:
CREATE TABLE t2 AS SELECT * FROM t1 WHERE col1 = '1' ;
Either use new style quote format:
EXECUTE IMMEDIATE q'[CREATE TABLE t2 AS SELECT * FROM t1 WHERE col1 = '1']' ;
Or older style still works also:
EXECUTE IMMEDIATE 'CREATE TABLE t2 AS SELECT * FROM t1 WHERE col1 = ''1''' ;
I use ”’