Question: The goal is to write SQL that will CREATE the test_table1 table seen in Creating a simple table (Links to an external site.) . BUT

The goal is to write SQL that will CREATE the test_table1 table seen in Creating a simple table (Links to an external site.) . BUT THE TABLE WILL ALSO HAVE:

  • col3 to hold the exact number of characters for a social security number (which is 11 characters long)
  • col4 to hold a price (which should always be less than 1000, and have 2 decimal points precision)
    • This has to do with how the NUMBER type can specify size and precision
    • Given the stipulation for col4, Oracle should not let you store a value of 1000 or higher.
  • For those two columns, you need to choose the correct data type
  • Ensure your SQL keywords are capitalized and semicolon is used!
    • The instructor doesn't do that, but we will
  • If you mess up, and you create test_table1 incorrectly, you can delete the table and try the CREATE again later.
    • SQL Workshop > Object Browser
    • Click on TEST_TABLE1
    • Click on Drop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!