Task 10: List all the tables contained within the system catalog, but only display the first 10 records with a TABLE_TYPE of SYSTEM VIEW. I did with:  SELECT * FROM (SELECT * from KimTay) WHERE ROWNUM <= 11;  and with: SELECT * FROM (SELECT TABLE_NAME FROM ALL_TABLES ORDER BY TABLE_NAME ) WHERE ROWNUM <= 10;   and with: SELECT * FROM SYSTABLES   but nothing worked and some of them gave me an error as (ERROR 1248 (42000) at line 1: Every derived table must have its own alias) and I need answers for these too: Task 11: List all the columns contained within the system catalog, but only display the first 11 records that are in the KimTay TABLE_SCHEMA. Task 12: List all the views contained within the system catalog, but only display the first 12 records.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

!I am doing all this from cengage!

Task 10: List all the tables contained within the system catalog, but only display the first 10 records with a TABLE_TYPE of SYSTEM VIEW.

I did with: 
SELECT *
FROM (SELECT * from KimTay) WHERE ROWNUM <= 11;
 and with:
SELECT *
FROM (SELECT TABLE_NAME FROM ALL_TABLES ORDER BY TABLE_NAME )
WHERE ROWNUM <= 10;
 
and with:
SELECT * FROM SYSTABLES
 
but nothing worked and some of them gave me an error as
(ERROR 1248 (42000) at line 1: Every derived table must have its own alias)
and I need answers for these too:
Task 11: List all the columns contained within the system catalog, but only display the first 11 records that are in the KimTay TABLE_SCHEMA.

Task 12: List all the views contained within the system catalog, but only display the first 12 records.

Task 13: Write the command to display only tables within the system catalog that have the KimTay TABLE_SCHEMA and are of the type BASE TABLE. Display only the following columns: TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE.

Task 14: Create an index named ITEM_INDEX1 on the ITEM_ID column in the INVOICE_LINE table.

Task 15: Create an index named ITEM_INDEX2 on the CATEGORY column in the ITEM table.

Task 16: Create an index named ITEM_INDEX3 on the CATEGORY and LOCATION columns in the ITEM table.

Task 17: Create an index named ITEM_INDEX4 on the CATEGORY and LOCATION columns in the ITEM table. List categories in descending order.

Task 18: Delete the index named ITEM_INDEX3.

Task 19: List every table that you have created thus far. Display the TABLE_SCHEMA and TABLE_NAME columns.

Task 20: List every column in the ITEM table and its associated data type.

Task 21: Alter the INVOICE_LINE table by adding the INVOICE_NUM column as a foreign key referencing the INVOICE_NUM column in the INVOICES table.

 
 
INVOICE_NUM
14216
14219
14222
14224
14228
14231
14233
14237
INVOICE_DATE
2021-11-15
2021-11-15
2021-11-16
2021-11-16
2021-11-18
2021-11-18
2021-11-18
2021-11-19
CUST_ID
125
227
294
182
435
125
435
616
Transcribed Image Text:INVOICE_NUM 14216 14219 14222 14224 14228 14231 14233 14237 INVOICE_DATE 2021-11-15 2021-11-15 2021-11-16 2021-11-16 2021-11-18 2021-11-18 2021-11-18 2021-11-19 CUST_ID 125 227 294 182 435 125 435 616
CUST_ID FIRST_NAME LAST_NAME ADDRESS
125
182
227
294
314
375
435
492
543
616
721
795
Joey
Billy
Sandra
Samantha
Tom
Melanie
James
Elmer
Angie
Sally
Leslie
Randy
Smith
Rufton
Pincher
Smith
Rascal
Jackson
Gonzalez
Jackson
Hendricks
Cruz
Smith
Blacksmith
17 Fourth St
21 Simple Cir
53 Verde Ln
14 Rock Ln
1 Rascal Farm Rd
42 Blackwater Way
16 Rockway Rd
22 Jackson Farm Rd
27 Locklear Ln
199 18th Ave
123 Sheepland Rd
75 Stream Rd
CITY
Cody
Garland
Powell
Ralston
Cody
Elk Butte
Wapiti
Garland
Powell
Ralston
Elk Butte
Cody
STATE POSTAL
WY
WY
WY
WY
WY
WY
WY
WY
WY
WY
WY
WY
82414
82435
82440
82440
82414
82433
82450
82435
82440
82440
82433
82414
EMAIL
jsmith17@example.com
billyruff@example.com
spinch2@example.com
ssmith5@example.com
trascal3@example.com
mjackson5@example.com
jgonzo@example.com
ejackson4@example.com
ahendricks7@example.com
scruz5@example.com
Ismith12@example.com
rblacksmith6@example.com
BALANCE
80.68
43.13
156.38
58.60
17.25
252.25
230.40
45.20
315.00
8.33
166.65
61.50
CREDIT_LIMIT REP_ID
500.00
750.00
500.00
500.00
250.00
250.00
1000.00
500.00
750.00
500.00
1000.00
500.00
05
10
15
10
15
05
15
10
05
15
10
05
Transcribed Image Text:CUST_ID FIRST_NAME LAST_NAME ADDRESS 125 182 227 294 314 375 435 492 543 616 721 795 Joey Billy Sandra Samantha Tom Melanie James Elmer Angie Sally Leslie Randy Smith Rufton Pincher Smith Rascal Jackson Gonzalez Jackson Hendricks Cruz Smith Blacksmith 17 Fourth St 21 Simple Cir 53 Verde Ln 14 Rock Ln 1 Rascal Farm Rd 42 Blackwater Way 16 Rockway Rd 22 Jackson Farm Rd 27 Locklear Ln 199 18th Ave 123 Sheepland Rd 75 Stream Rd CITY Cody Garland Powell Ralston Cody Elk Butte Wapiti Garland Powell Ralston Elk Butte Cody STATE POSTAL WY WY WY WY WY WY WY WY WY WY WY WY 82414 82435 82440 82440 82414 82433 82450 82435 82440 82440 82433 82414 EMAIL jsmith17@example.com billyruff@example.com spinch2@example.com ssmith5@example.com trascal3@example.com mjackson5@example.com jgonzo@example.com ejackson4@example.com ahendricks7@example.com scruz5@example.com Ismith12@example.com rblacksmith6@example.com BALANCE 80.68 43.13 156.38 58.60 17.25 252.25 230.40 45.20 315.00 8.33 166.65 61.50 CREDIT_LIMIT REP_ID 500.00 750.00 500.00 500.00 250.00 250.00 1000.00 500.00 750.00 500.00 1000.00 500.00 05 10 15 10 15 05 15 10 05 15 10 05
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education