文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>mysql & gbase 常用函数

mysql & gbase 常用函数

时间:2011-05-21  来源:mefly

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 column`s character set to utf8*/
ALTER TABLE `purchaserequest` CHANGE `justification` `justification` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL 


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

 



通过 Wiz 发布

排行榜 更多 +
耶小兔子2

耶小兔子2

休闲益智 下载
nba2k20豪华版

nba2k20豪华版

体育竞技 下载
画线征服火柴人安卓版

画线征服火柴人安卓版

动作格斗 下载