120 likes | 212 Views
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.
E N D
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
Select the erroneous code and copy into Notepad, correct the code
Save the document as 2Queries.sql in the OraSolutions Chapter 2 Tutorial Folder – change type to All Files Change to All Files
Select edited code from Notepad and copy into SQL*Plus and press Enter.
Skip to Page 62, open the Ch2Queries.sql script in Notepad, write the SQL to create FACULTY table and paste into SQL*Plus
Use DESCRIBE to view information about LOCATION and FACULTY tables:
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’;
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
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.