CRUD操作的sql语句?
时间: 2024-03-20 14:35:42 浏览: 82
以下是CRUD操作的SQL语句示例:
1. 创建表:
```sql
CREATE TABLE table_name (
column1 datatype constraint,
column2 datatype constraint,
...
);
```
2. 插入数据:
```sql
INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);
```
3. 查询数据:
```sql
SELECT column1, column2, ...
FROM table_name
WHERE condition;
```
4. 更新数据:
```sql
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
```
5. 删除数据:
```sql
DELETE FROM table_name
WHERE condition;
```
阅读全文