Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to get the text of create table sql when I know the table name

How to get the text of create table sql when I know the table name

Scheduled Pinned Locked Moved Database
databasetutorialquestionoracle
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    richardye
    wrote on last edited by
    #1

    How can I get the text of create table sql when I know the table name? Is there any view I can query for? for example I create a table T in oracle database. Can I get the text of its create table sql through oracle view? "create table T (sno number(3,0) primary key);" Many thanks.

    G 1 Reply Last reply
    0
    • R richardye

      How can I get the text of create table sql when I know the table name? Is there any view I can query for? for example I create a table T in oracle database. Can I get the text of its create table sql through oracle view? "create table T (sno number(3,0) primary key);" Many thanks.

      G Offline
      G Offline
      GuyThiebaut
      wrote on last edited by
      #2

      Open query analyzer. Press F8 if the object browser is not present. Select your database and then right click on the appropriate table. Cursor over Script Object To New Window As then select Create. Regards Guy

      You always pass failure on the way to success.
      R 1 Reply Last reply
      0
      • G GuyThiebaut

        Open query analyzer. Press F8 if the object browser is not present. Select your database and then right click on the appropriate table. Cursor over Script Object To New Window As then select Create. Regards Guy

        You always pass failure on the way to success.
        R Offline
        R Offline
        richardye
        wrote on last edited by
        #3

        My apologize. My meaning is to get it by command line,not by the ORACLE console. Do you have any way in resolving it?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups