1 / 12

Using the SQL*Plus Editor with Oracle Enterprise Edition

Using the SQL*Plus Editor with Oracle Enterprise Edition. CIS298 Chapter 2 Tutorial Guide. Double click on SQL*Plus and Log On as instructed:. STUDxx. CISxx. ORCL. Connect to the DB using SQL*Plus. Enter code with a typo….p.59.

Download Presentation

Using the SQL*Plus Editor with Oracle Enterprise Edition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using the SQL*Plus Editor with Oracle Enterprise Edition CIS298 Chapter 2 Tutorial Guide

  2. Double click on SQL*Plus and Log On as instructed: STUDxx CISxx ORCL

  3. Connect to the DB using SQL*Plus

  4. Enter code with a typo….p.59

  5. Select the erroneous code and copy into Notepad, correct the code

  6. Save the document as 2Queries.sql in the OraSolutions Chapter 2 Tutorial Folder – change type to All Files Change to All Files

  7. Select edited code from Notepad and copy into SQL*Plus and press Enter.

  8. Skip to Page 62, open the Ch2Queries.sql script in Notepad, write the SQL to create FACULTY table and paste into SQL*Plus

  9. Use DESCRIBE to view information about LOCATION and FACULTY tables:

  10. Use the Oracle data dictionary(p. 64-68): • Specifically, query the data dictionary for the objects which have been created so far… • SELECT table_name FROM user_tables; • DESCRIBE user_constraints; • SELECT constraint_name, table_name, constraint_type FROM user_constraints; • SELECT constraint_name, table_name, constraint_type FROM user_constraints WHERE table_name = ‘FACULTY’;

  11. Modifying and Deleting Tables • P. 70 1., 2. See FIG 2-12 • P. 72 1., 2. to add start_date • P. 72 1., 2. to modify f_rank • P. 73 1., 2., 3. to drop a column and add a column (this is done to replace a column) • P. 74 1., 2. to add a constraint • P. 74 1., 2 to drop a constraint • P. 75 1., 2. to disable and enable constraint • P. 75 1., 2. to drop FACULTY table

  12. What to hand in for the Ch2 tutorial: • Type your name preceded by - - at the top of the Ch2Queries.sql document. • Print Ch2Queries.sql document and hand in.

More Related