Question

ID Title 1 Author Richie Karen с JAVA Script Java Year 1955 1958 1959 Price 10 20 10 2 4 5 6 C++ prolog Peri Schwartz Ross Ma

1. Write the definition you used to create the table 2. Provide a screen shot of all the data in the table (Load the screen s

Database Management

0 0
Add a comment Improve this question Transcribed image text
Answer #1
abc

create database and use command

  • create database abc;

  • use abc

  1. To create a table definition

create table book(

ID INT NOT NULL,
Title VARCHAR(100) NOT NULL,
Author VARCHAR(100) NOT NULL,
Year INT,
Price INT);

2. insert elements and showing the table

INSERT INTO book(ID,Title,Author,Year,Price)VALUES(1,'C','Richie',1955,10),

(2,'JAVA Script','Karen',1958,10),

(4,'Java','Schwartz',1959,10),

(5,'C++','Ross',1959,20),

(6,'prolog','Maria',1972,10),

(7,'Perl','Wall',1987,20);

To show the table command:

  • select *from book;

3. list book titles and years only

  • select Title,Year from book;

​​​​​​​​​​​​​​

4) how many books are in the table

  • select count(*) from book;

​​​​​​​

5) list the book with distinct year .

let the distinct year be 1987 ,(you can provide any year in the table)

command:select *from book where Year=1987;

6) order the book information by year in a descending order

  • select *from book order by Year desc;

​​​​​​​

7) list all the books published after year 1970

  • select *from book where year>1970;

​​​​​​​

Add a comment
Know the answer?
Add Answer to:
Database Management ID Title 1 Author Richie Karen с JAVA Script Java Year 1955 1958 1959...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT