编写mysql语句 实现创建数据库名为_SqlServer编写数据库表的操作方式(建库、建表、修改语句)...
时间: 2024-01-27 22:04:36 浏览: 10
创建数据库:
```
CREATE DATABASE _SqlServer;
```
创建表:
```
USE _SqlServer;
CREATE TABLE myTable (
id INT PRIMARY KEY,
name VARCHAR(50),
age INT,
city VARCHAR(50)
);
```
修改表:
```
USE _SqlServer;
ALTER TABLE myTable ADD email VARCHAR(50);
ALTER TABLE myTable MODIFY name VARCHAR(100);
ALTER TABLE myTable DROP COLUMN city;
```
阅读全文