I am having requirement where I want to use database_name and table_name as parameterized in stored procedure.
In procedure I will be performing below DML operations :
INSERT INTO database_name.table_name
SELECT * FROM database_name.table_name;
WHERE DATE_1=DATE '1900-12-01';
How this can be achieved using dynamic SQL?
Thanks in advance..!!
Of course you should always be aware of possible SQL Injection: