2021-1-21

MYSQL查询表结构

1 show columns from 表名 ( describe 表名);
show full fields from tsysmenu / / 比上面那个更全面

SHOW FULL TABLES FROM tjjsw LIKE ‘t%’ 查询库中所有的表名
2 show create table 表名; / /查建表语句
use information_schema
select * from columns where table_name = ‘表名’

/ *this can see the table information * /
show table status from fortioa;

/ *this can see all the fields detail information of a table including the character set * /
show full fields from account

/ *change the table columns character set to utf8 * / ALTER TABLEpurchaserequestCHANGEjustificationjustification` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL

删除语句( DELETE)
在数据库中,有些数据已经失去意义或者是错误的,就需要将它们删除,此时可以使用 DELETE语句,该语句的格式如下:
Delete from table_name
Where condition

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值