Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is dynamic SQl and how you will create and execute
dynamic sql?

Answer Posted / ravi singh

Dynamic SQL enables you to executes your SQL statement at run time on the basis of different conditions. They can be executed with the help of creating SQLs at run time. you can store your where clause or sql statements in variables and on the basis of requirements you can execute them.
Dynamic SQL comprises reference cursors.
for ex: open cursor for select a,b,c from table_name;

execute immediate 'select a,b from table_name'

you can store the result set into variables too.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is faster truncate or drop?

1096


Can cursors be part of a trigger body?

1691


Why query optimization is needed?

970


How can I get the number of records affected by a stored procedure?

1118


what are sequences

1811


What is the difference between a query and a report?

1050


Can one improve the performance of sql*loader? : aql loader

1093


can sql servers linked to other servers like oracle? : Sql dba

1047


What is the difference between microsoft sql and mysql?

1014


What is union, minus and interact commands?

1361


How do I run pl sql in sql developer?

1165


How do I write a cron which will run a sql query and mail the results to agroup?

1027


What is the current version of postgresql?

1124


What is the most common sql injection tool?

1083


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

1017