Question

Gmail Maps © Hanson College BC... Dashboard Go to Help Search ID Year Price 1 Author Richie Karen 2 4 Title C JAVA Script Jav

Database Management

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

Create a database in MySql:

using MySql phpMyAdmin

SQL command to create a database in MySql.

create DATABASE BOOKDB;

Databases $7 SQL Status User accounts Export Import 3 Settings Replication 1 Variables Charsets More - Run SQL query/queries

use database to create a table into that database using the sql command. or select from the database which is display in the left menu list.

Databases $22 SQL Status User accounts -Run SQL query/queries on server localhost: 0 1 use BOOKDB:| Get auto-saved query Cl

1. Now create a table using the sql command:

CREATE TABLE IF NOT EXISTS Book (
    ID INT NOT NULL PRIMARY KEY,
    Title VARCHAR(50),
    Author VARCHAR(50),
    Year INT(10),
    Price INT(10)
);

2. Insert the data into database:

INSERT INTO Book VALUES(1, 'C','Riche',1955,10);
INSERT INTO Book VALUES(2, 'JAVA Script','Karen',1958,20);
INSERT INTO Book VALUES(4, 'Java','Schwartz',1959,10);
INSERT INTO Book VALUES(5, 'C++','Ross',1959,20);
INSERT INTO Book VALUES(6, 'Prolog','Maria',1972,10);
INSERT INTO Book VALUES(7, 'Perl','Wall',1987,20);

3. List the books title and years only.

SELECT Title, Year from Book;

Title Year с 1955 JAVA Script 1958 Java 1959 C++ 1959 Prolog 1972 Perl 1987

Add a comment
Know the answer?
Add Answer to:
Database Management Gmail Maps © Hanson College BC... Dashboard Go to Help Search ID Year Price...
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
Active Questions
ADVERTISEMENT