USE [DATABASE]
Selects the default database for the current session. Subsequent queries execute against this database unless explicitly qualified by name.
Syntax
USE db_nameDescription
USE db1;
SELECT COUNT(*) FROM mytable; # selects FROM db1.mytable
USE db2;
SELECT COUNT(*) FROM mytable; # selects FROM db2.mytablemariadb db1 # starts the mariadb command-line client with db1 as the current databaseSee Also
Last updated
Was this helpful?

