首页 > 代码库 > mysql 语句
mysql 语句
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;
mysql 语句
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。