数据库基础语法
-- 创建并使用数据库
CREATE DATABASE `mydatabase`;
USE `mydatabase`;
-- 查看已有的数据库
SHOW DATABASES;
-- 插入语句
INSERT INTO
table_reference
VALUE(S)
-- 查询语句
SELECT
select_expr,...
FROM table_reference
[WHERE where_definition]
[GROUP BY {dcol_name | expr | position}]
[HAVING where_definition]
[ORDER BY {col_name | expr | position}
[ASC | DESC], ...]
[LIMIT {[offset,] row_count}]
-- 修改
UPDATA table_references
SET col_name1 = expr1[, colname2 = expr2 ...]
[WHERE where_definition]
-- 删除
DELETE FROM table_name
[WHERE where_definition]