CREATE TABLE 创建表

create table studentddf
(

id int,
name varchar(20),
age int,
birth date

);

insert into studentddf(id,name,age ,birth)
values(1,'张三',18,'2006-05-20');

select * from studentddf;

create table studentcs
(

id int primary key,
name varchar(20),
age int,
birth date

);

——————————————————————————————————————————————————————

表名、字段名不要用中文,尽量用英文
每一行字段定义最后不要加逗号
数据类型要匹配:名字用 VARCHAR、年龄用 INT
已经存在的表,不能重复创建,会报错

posted @ 2026-04-30 22:49  菜鸟的奋斗军  阅读(6)  评论(0)    收藏  举报