Home  >  Article  >  Database  >  mysql创建表并设置主键自增_MySQL

mysql创建表并设置主键自增_MySQL

WBOY
WBOYOriginal
2016-06-01 13:42:353103browse

bitsCN.com
mysql 创建表并设置主键自增 mysql 创建表:     mysql> create table user(      -> userid int ( 4 ) primary key not  null  auto_increment,      -> username varchar(16 ) not  null ,      -> userpassword varchar(32 ) not  null       -> );           create table log(  logid int ( 4 ) primary key not  null  auto_increment,  logtitle varchar(32 ) not  null ,  logcontent varchar(160 ) not  null ,  logtime datetime not null ,  userip varchar(64 ) not  null   );     作者 fanjf bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn