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 TABLE
purchaserequestCHANGE
justificationjustification` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
删除语句( DELETE)
在数据库中,有些数据已经失去意义或者是错误的,就需要将它们删除,此时可以使用 DELETE语句,该语句的格式如下:
Delete from table_name
Where condition