Link to home
Start Free TrialLog in
Avatar of chalie001
chalie001

asked on

dynamic sql

hi is it posible to create dynamic sql to create a select statement

for example i have table with 50 rows i need to contract a select statemnt for all column how can i do that dynamic
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Have you seen this
hi is it posible to create dynamic sql to create a select statement

Short answer: yes ;-)

BUT: what exactly do you want to do?! you provide little information about your "problem"...
Avatar of chalie001
chalie001

ASKER

i have table employee which got col1.co3,col2 etc until 50 columns

i what to write select for those 50 columns is there a dynamic way i can do that
Thanks, but this is still insufficient. I have no idea what you want to do?!? Where do you want to create/use/execute that SQL statement?! You should tell us some more ;-)

There are ways to build a SELECT statement dynamically (e.g. via 'execute immediate' or dbms_sql), BUT if we don't know what you're supposed to do, then there can't be an adequate solution...
ASKER CERTIFIED SOLUTION
Avatar of chalie001
chalie001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Whether this is good or not, you gave half of the answer yourself ;-)
Now you may select this value into a variable and do an "execute immediate..." from within PL/SQL for instance...
correct