【生意多】-免费发布分类信息
当前位置: 首页 » 新闻 » 教程 » 操作系统 » 正文

英文问路常用语句(抖音常用语句)

放大字体  缩小字体 发布日期:2022-07-01 06:10:24    浏览次数:9

create database if not exists hidb; #创建库,如果此库不存在
show warnings; #查看db最近一次的告警
alter database hidb character set 'utf-8'; #设置数据库字符集
drop database testdb; #删除库
show databases like '%db'; #查询以db结尾的数据库信息
help show databases; #帮助

create table tbl2 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE KEY,name VARCHAr(60) NOT NULL); #创建表结构

create table tbl2 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT ,name VARCHAr(60) NOT NULL,UNIQUE KEY(id,name)); #创建表结构

help desc; #帮助
describe city; #查询表结构
DESC tbl2; #查询表结构

show engines; #查看支持的引擎
show table status; #查看所有表状态信息
show table status like 'tablename'G; #查看单表状态信息
show table status where name like 'table'; #查看以table开头的表
show table status where Engine='MyISAM'; #查询引擎为MyISAM的表状态
alter table tbl3 ADD gender ENUM('F','M'); #修改表结构,新增枚举字段
alter table tbl3 CHANGE id stuid SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY; #修改字段名 id 为 stuid
alter table tbl3 ADD INDEX (name); #创建索引
show INDEXES from tbl3; #查看表中的所有索引
alter table tbl3 drop index id; #删除id字段的索引
alter table tbl3 drop primary key id; #删除id字段的主键
create table tbl4 like mysql.user; #创建tbl4表,从mysql.user复制表结构
create table tbl5 select host,user,passwd from mysql.user; #查询mysql.user表中的字段及内容,放到新创建的表中
create index indexname on tabl5(id); #创建索引

 
(文/小编)
打赏
免责声明
• 
本文为小编原创作品,作者: 小编。欢迎转载,转载请注明原文出处:https://www.31duo.com/news/show-3578508.html 。本文仅代表作者个人观点,本站未对其内容进行核实,请读者仅做参考,如若文中涉及有违公德、触犯法律的内容,一经发现,立即删除,作者需自行承担相应责任。涉及到版权或其他问题,请及时联系我们。
 

(c)2016-2019 31DUO.COM All Rights Reserved浙ICP备19001410号-4

浙ICP备19001410号-4