新初学者提问之一
新菜鸟提问之一!
sql2000,查询分析器里:
输入“create database student;"新建一个数据库,我接下来想在这个数据库中新建一个表,应该怎么写,
create table Student(Sno int primary key,Sname char(8) unique,Ssex char(2),Sage smallint);
谢谢各位大侠!
------解决方案--------------------
建表:
sql2000,查询分析器里:
输入“create database student;"新建一个数据库,我接下来想在这个数据库中新建一个表,应该怎么写,
create table Student(Sno int primary key,Sname char(8) unique,Ssex char(2),Sage smallint);
谢谢各位大侠!
------解决方案--------------------
建表:
- SQL code
create table A(姓名 nvarchar(10),工资 int) insert A select '小王', 2000 union all select '小张', 1200 union all select '小非', 2000 union all select '小赵', 5000 union all select '大张', 5000 union all select '大非', 4000 union all select '大赵', 6000
------解决方案--------------------
create database student
use student
create table Student(Sno int primary key,Sname char(8) ,Ssex char(2),Sage smallint)