mysql
宅羽
这个作者很懒,什么都没留下…
展开
-
MySQL资料之查看表结构和注释
◆ 简单描述表结构,字段类型: 显示表结构,字段类型,主键,是否为空等属性,但不显示外键。 desc tabl_name; ◆ 查看表生成的DDL: show create table table_name; ◆ 查询表中列的注释信息: select * from information_schema.columns where table_schema = 'db' ...原创 2019-12-25 10:49:10 · 1172 阅读 · 0 评论 -
MySQL资料之常用函数
◆ date_formate 函数: 字符串转成日期类型 select date_formate('2019-11-21','%y-%m-%d');原创 2019-11-21 09:40:15 · 81 阅读 · 0 评论 -
MySQL资料之常规语句举例
赋权: grant all privileges on rat.* to snow@localhost identified by 'xxx'; 刷新权限: flush privileges; 建表: create table customer ( id int(11) NOT NULL AUTO_INCREMENT, up_sys varchar(100) not nu...原创 2018-01-18 14:05:07 · 186 阅读 · 0 评论 -
MySQL资料之Workbench使用
◆ 登陆Mysql数据库: DataBase -> Connect to Database原创 2018-04-25 14:33:30 · 199 阅读 · 0 评论 -
MySQL资料之命令行操作
◆ 批处理模式 你交互式地使用mysql输入查询并且查看结果,同时也可以以批模式运行mysql。把你想要运行的命令放在一个文件中,然后告诉mysql从文件读取它的输入: shell> mysql < batch-file shell> mysql -h host -u user -p < batch-file Enter password: ******** ...原创 2018-06-30 17:54:53 · 142 阅读 · 0 评论 -
MySQL资料之系统表使用
◆ 查询表信息: select t.TABLE_NAME, t.TABLE_COMMENT, t.CREATE_TIME, t.UPDATE_TIME from INFORMATION_SCHEMA.TABLES t where t.TABLE_SCHEMA = 'workstation'; ◆ 查询字段信息: select t.COLUMN_NA...原创 2018-06-30 17:57:19 · 599 阅读 · 0 评论