MYSQL Tutorial



MYSQL USE DATABASE


MySQL: USE Database Command

The USE command tells MySQL which database you want to work with. It sets the default database for your session, so you don’t have to specify the database name in every query.

πŸ”Ή Syntax:

USE database_name;
  

πŸ”Ή Example:

To select the database myshop, run:

USE myshop;
  

After this, all your commands like SELECT, INSERT, or CREATE TABLE will be applied to the myshop database by default.

Note: If you forget to select a database using USE, you might get errors when trying to access tables or data.

🌟 Enjoyed Learning with Us?

Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!

Leave a Google Review