CREATE OR REPLACE PROCEDURE insert1(stringin IN VARCHAR2,value1 IN VARCHAR2,value2 IN VARCHAR2) IS val VARCHAR2(20); val2 VARCHAR2(20); val3 VARCHAR(20); BEGIN IF NOT EXISTS (SELECT 1 FROM all_tables WHERE owner = 'HR') THEN val3:='CREATE TABLE stringin(value1 VARCHAR2(20), value2 VARCHAR2(20)'; EXECUTE IMMEDIATE val3; BEGIN -- abc:= CREATE TABLE tbl_name (value1 VARCHAR2(20), value2 VARCHAR2(20)) ; val1:= 'INSERT INTO val3 (value1, value2) VALUES("GGG", "XYZ")'; DBMS_OUTPUT.PUT_LINE (val1); END ; ELSE BEGIN val2:=' INSERT INTO stringin (value1, value2) VALUES ("GGG", "XYZ")' ; DBMS_OUTPUT.PUT_LINE (val2); END ; END IF ; END ;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[table_name]') AND type in (N'U')) CREAT TABLE ... GO
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)