当前位置:网站首页>MySQL basic learning notes 03
MySQL basic learning notes 03
2022-06-11 09:57:00 【The code family】
4.DDL- Table operations - Inquire about
① Query all tables in the current database
show tables;

② Query table structure
desc Table name ;

③ Query the table creation statement of the specified table
show create table Table name ;

5.DDL- Table operations - establish
① Create table syntax
create table Table name (
Field 1 Field 1 type [comment Field 1 notes ],
Field 2 Field 2 type [comment Field 2 notes ],
Field 3 Field 3 type [comment Field 3 notes ],
...
Field n Field n type [comment Field n notes ]
) [comment Table annotation ];
Be careful : Field n Finally no “,”
Example :
| id | name | age | gender |
| 1 | Pleasant Sheep | 28 | male |
| 2 | lazy sheep | 24 | male |
create table tb_user(
id int comment ' Number ',
name varchar(50) comment ' full name ',
age int comment ' Age ',
gender varchar(1) comment ' Gender '
) comment ' User table ';

边栏推荐
- Oracle XDB组件的重建
- 不同CV任务的标注类型
- 一万字彻底学会堆和二叉树
- js基础--关于DOM
- Opencv image basic operation (IV) -- image feature extraction (corner detection)
- New feature in ES6 -- arrow function
- What hydraulic oil is used for Denison hydraulic pump? What are the requirements
- Understanding of the keyword this in JS
- What are the differences between Parker pilot solenoid valve and direct acting solenoid valve?
- 数据一致的问题
猜你喜欢
随机推荐
Function and function of wandfluh proportional valve
Tap and longtap encapsulation of touch events -- from Ono
Q355HR钢板化学成分
对于力士乐电磁换向阀的功能与作用,你知道多少
Q1's revenue exceeded Wall Street's expectations, and the value of Zhiwen group is waiting to return
ORACLE RAC中连接ScanIP报错ORA-12545的问题解决
全局池化–Pytorch
【clickhouse专栏】新建库角色用户初始化
Events in JS
An error can't locate env pm in @INC
Opencv image basic operation (III) -- image feature extraction (corner detection)
RAC单独修改scanip到不同网段时会报错
POJ3250「Bad Hair Day」
ESP8266_GET请求天气预报、json解析
ESP8266_ SNTP(Simple Network Time Protocol)
Project lifecycle
JS foundation -- Operator
parker派克先导式电磁阀和直动式电磁阀的区别有哪些?
等待事件 enq: KO - fast object checkpoint可行的一些处理方法
CISP-PTE XSS基础









