Mysql Common Commands
1. MySQL statement specifications:
Keywords and function names should be in all capital letters;
Database names, table names, and field names must all be lowercase;
SQL statements must end with a semicolon.
2. Common MySQL commands:
- Display the current database version
SELECT VERSION();
- Display the current time:
SELECT NOW();
- Display the current user:
SELECT USER();
- Create a database:
The syntax is:
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name [DEFAULT] CHARACTER SET [=] charset_name;