Create a synonym for your nltPLoYEEs table Call it EMP Then find the names of

Create a synonym for your nltployees table call it

This preview shows page 17 - 20 out of 44 pages.

6. Create a synonym for your nltPLoYEEs table. Call it EMP. Then, find the names synonyms that are in your schema. of all t 7. Run 1ab-03-07 . sql to create the deptso view for this exercise. determine tlle names and definitions ofall the views in your schena. Cr€ate a retrieves view information: the view name and text from the USER vlEws dictionary view.Note: The EMP_DETATLS_VrEW was created as part ofyour Note: You can see the complete definition ofthe view if you use Run Script (or press SQL Developer. If you use Execute Statement (or press.Fg) in SQL Developer, horizontally in the result pane. lf you usc SQLrPlus to see more contents of a use the sET LoNG n comman4 where n is the value ofthe number of characters LONG column that you watrt to You 4eed to report that data schema. F5) in scroll LoNG column, of the see. SELECT vier_EaD€, text FROM uger vlcwg; Oracle Database I 19: SQL Fundamentals ll A - 28
Image of page 17
Practice 3: Solutions l. Query the data dictionary to see information about the tables own. you 2. Query the dictionary view to see information about all the tables that you Exclude tables that you own. can access. ; 3. For a specified table, create a script that reports the column names, data types, types' lengths, as well as whether nulls are allowed. Prompt the user to enter the name. Give appropriate aliases to the DATA_PREcrsroN and DATA_SCALE columns.Save this script in a file named lab_O3_01 and data table . sql. t name. , 4. Create a script that reports the column name, constraint nagrei constraint type, condition, and status for a specified table. You must join the usER_coNsTRAINTs USER_CoNS_COLUMNS tables to obtain all this information. Prompt the user to table name. Save the script in a file named 1ab_03_04 search and enter the . sq1. name. uc ucc arDe i
Image of page 18
Practice 2: Solutions (continued)
Image of page 19
Image of page 20

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture