以下是一些常见的 SQL 示例代码:
CREATE DATABASE database_name;
CREATE TABLE table_name (
column1 data_type,
column2 data_type,
...
);
INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);
SELECT column1, column2, ...
FROM table_name
WHERE condition;
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
DELETE FROM table_name
WHERE condition;
CREATE INDEX index_name ON table_name (column_name);
DROP INDEX index_name ON table_name;
COMMIT;
ROLLBACK;
以上是一些常见的 SQL 示例代码,不同的数据库可能会有不同的语法和命令。