Hi,
Dynamic Sql: Its like you build the query during run time.
For example: suppose you dont know the table name on which you need to query on and you are getting it as input parameter to a procedure. Then you need to build the query as a string and execute it. In short , we know of the outcome of the query only during execution.
eg: set v_string ='Insert into table1 values (1,2)';
execute immediate v_string
Static query: You can know the end result before running itself. Its like you know where all the query is going to affect.
You can get more on dynamic sql in any sql tutorial...
Cheers
Comment