DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: SQL generating SQL

  1. #1
    Join Date
    Aug 2001
    Posts
    5
    Under what circumstances ( example please ) SQL generating SQL is needed ?

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    When you want to create some script dynamically. Say for example you want to to see the description of tables under a perticular user schema

    Code:
      spool alter_table.sql
      SELECT "desc "||table_name ||"  " FROM user_tables;
       spool off;
       @alter_table.sql
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width