标签:sql 语句 mod var har odi alter database character rac
create DATABASE if not exists test_mysql CHARACTER SET utf8;
use test_mysql;
create table if not EXISTS user (
id int(11) not null auto_increment COMMENT ‘自增ID‘,
name VARCHAR(100) not null comment ‘name‘,
age int(4) not null DEFAULT 0 comment ‘age‘,
primary key (id, name)
)
auto_increment=1;
desc user;
show create table user;
show table status like ‘user‘;
select * from user;
ALTER table user modify name VARCHAR(100) not null DEFAULT ‘‘
ALTER table user change name new_name VARCHAR(50) not null DEFAULT ‘‘
ALTER table user add (address VARCHAR(50) not null)
alter table user drop address
TRUNCATE table user;
标签:sql 语句 mod var har odi alter database character rac
原文地址:http://www.cnblogs.com/kaishan1990/p/6126615.html