建表
命令:create table <表名> ( <字段名1> <类型1> [,..<字段名n> <类型n>]);
mysql> create table MyClass(
> id int(4) not null primary key auto_increment,
> name char(20) not null,
> sex int(4) not null default '0',
> degree double(16,2));
本文详细介绍了MySQL中创建表格的基本命令及其使用方法。通过具体的例子展示了如何定义表结构,包括字段名称、数据类型、主键及自增等属性。
建表
命令:create table <表名> ( <字段名1> <类型1> [,..<字段名n> <类型n>]);
mysql> create table MyClass(
> id int(4) not null primary key auto_increment,
> name char(20) not null,
> sex int(4) not null default '0',
> degree double(16,2));
842
576
1452

被折叠的 条评论
为什么被折叠?