183k views
3 votes
Priyam is Class XI student. She is learning some basic commands. Suggest some SQL commands to her to do the following tasks:

i. To show the lists of existing databases
ii. Select a database to work
iii. Create a new database named Annual_Exam

User Sam Khan
by
7.4k points

1 Answer

2 votes

Answer:

here are some SQL commands that Priyam can use to accomplish the given tasks:

i. To show the lists of existing databases:

SHOW DATABASES;

This command will display a list of all the databases that exist on the database server.

ii. Select a database to work: USE <database_name>;

This command will select the specified database as the current working database. Once a database is selected, any subsequent SQL commands will be executed in the context of that database.

iii. Create a new database named Annual_Exam:

CREATE DATABASE Annual_Exam;

Step-by-step explanation:

This command will create a new database named "Annual_Exam". Once the database is created, Priyam can use the USE command to select the new database as the current working database and start creating tables or adding data.

User Kluddizz
by
7.5k points