When there are many databases inSQLSchema, to start an action you need to select the database to execute those rows.

command in sql

command in SQL

The USE command in SQL is used to select an existing database in SQL Schema.

The syntax of the USE command in SQL

USE ten_co_so_du_lieu;

Ten_co_so_du_lieu must always be unique in the RDBMS

Example of a USE command in SQL

You can check the database as in the case below:

SQL> SHOW DATABASES; +--------------------+ | Database     | +--------------------+ | CONGNGHE     | | LANGCONGNGHE   | | WINDOWS      | | mysql       | | ANDROID      | | iOS        | +--------------------+ 6 rows in set (0.00 sec)

Now that you want to work with the CONG NGHE database, just execute the USE command below and start working on the CONG NGHE database:

SQL> USE AMROOD;

In the next article, we will move on to working with the powers on the table, beginning with the CREATE TABLE statement, creating a new table.

.

Leave a Comment

Close