| 失效链接处理 | 
| mysql命令集 PDF 下载 
	本站整理下载: 
	相关截图:  
	主要内容: 
		<   
		Int  整数 
		float   double   decimal     实数 
		char   varchar   字符 
		date  datetime   日期、时间 
		#  use 数据库名 : 指定使用数据库 
		< 导入数据库: 
		命令集 
		1创建数据库:create database 数据库名; 
		2删除数据库:drop database 数据库名称; 
		3查看全部数据库:show databases; 
		4查看当前数据库:select database 数据库名称 
		4查看特定的数据库:show create database 数据库名; 
		5修改数据库:ALTER DATABASE 数据库名称 DEFAULT CHARACTER SET 编码方式 COLLATE 编码方式_bin 
		6、换库:  use 数据库名  
		7、建表: create table 表名 (字段名 类型。。。。); 
		8、查看表: show tables; 
		9、查看特定表: show create table 表名; 
		10、查看表结构: describe 表名 /(desc 表名) 
		11、修改表名: alter table 旧表名 rename to 新表名 
		12、修改字段名: alter table 表名 change 旧字段名 新字段名 数据类型 
		13、修改字段类型: alter table 表名 modify 字段名 类型 
		14、增加字段: alter table 表名 add 字段名 类型 first/after. 
		15、删除字段:alter table 表名 drop 字段名 
		16、调整字段位置:alter table 表名 modify 字段名 类型 first/after 
		17、删除表: drop table 表名; 
		< 约束:主键 
		1、建表同时添加主键: 
		(1)在字段后not null primary key; 
		(2)在字段下直接添加 primary key(字段名);【联合主键必须用】 
		2、删除主键: alter table 表名 drop primary key 
		3、在现有表添加主键: 
		Alter table 表名 接 
		(1)change 旧字段名 新字段名 字段类型 not null primary key; 
		(2)modify 字段名 字段类型 not null primary key; 
		(3)add primary key(字段名) 
		(4)add constraint 主键名 primary key(字段名) | 



 
     苏公网安备 32061202001004号
苏公网安备 32061202001004号


 
    