常見的MySQL命令語句包括:
CREATE DATABASE database_name;
DROP DATABASE database_name;
USE database_name;
CREATE TABLE table_name (
column1 datatype,
column2 datatype,
…
);
DROP TABLE table_name;
INSERT INTO table_name (column1, column2, …)
VALUES (value1, value2, …);
UPDATE table_name
SET column1 = value1, column2 = value2, …
WHERE condition;
DELETE FROM table_name
WHERE condition;
SELECT column1, column2, …
FROM table_name
WHERE condition;
SELECT column1, column2, …
FROM table_name
ORDER BY column1 ASC/DESC;
SELECT column1, column2, …
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
SELECT COUNT(column_name)
FROM table_name
WHERE condition;
SELECT column1, COUNT(column2)
FROM table_name
GROUP BY column1;
ALTER TABLE table_name
ADD column_name datatype;
CREATE INDEX index_name
ON table_name (column1, column2, …);
這些只是一些基礎的MySQL命令語句,實際使用中還有更多命令和語法可以掌握。