Generate SQL from SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eeriehunk
    New Member
    • Sep 2007
    • 55

    Generate SQL from SQL

    Hi All,
    I was trying to understand the question "Generate SQL from SQL". I am not exactly sure what that means. I Googled it but there wasn't an exact answer. Some say its DBMS_SQL, or Execute Immediate or some call a sql embedded inside a string. Kindly give an example.
    Regards,
    Aj
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    the following sample just might help.

    Code:
    select TABLE_NAME, 'CREATE SEQUENCE SEQ_'||  LTRIM( table_name,'TBL') ||' MINVALUE 1 MAXVALUE 9999999999999999999999999 START WITH 1 INCREMENT BY 1 NOCACHE;' from user_tables

    Comment

    • eeriehunk
      New Member
      • Sep 2007
      • 55

      #3
      Thanks, for the sample code.
      Regards,
      Aj

      Comment

      Working...