SQL(Structured Query Language)是一种用于管理和操作关系数据库的标准编程语言。以
下是一些常用的 SQL 语句及其基本用法:
1. **选择数据**:
```sql
SELECT column1, column2 FROM table_name;
```
2. **选择特定条件的数据**:
```sql
SELECT column1, column2 FROM table_name WHERE condition;
```
3. **插入数据**:
```sql
INSERT INTO table_name (column1, column2) VALUES (value1, value2);
```
4. **更新数据**:
```sql
UPDATE table_name SET column1 = value1 WHERE condition;
```
5. **删除数据**:
```sql
DELETE FROM table_name WHERE condition;
```
6. **创建新表**:
```sql
CREATE TABLE table_name (
column1 datatype,
column2 datatype,
...
);
```
7. **修改表结构**:
```sql
ALTER TABLE table_name