使用SQL语句在客户订货管理数据库Goods创建Good(商品信息表)表。 Good(商品信息表) 字段名 字段类
已帮助 人
使用SQL语句在客户订货管理数据库Goods创建Good(商品信息表)表。 Good(商品信息表) 字段名 字段类型 是否为空 约束 意义 Goodno Char(4) 否 主键 商品号 Goodname Varchar(10) 否 商品名 Price smallint 否 大于0 单价

回答
共1条回复-
use master go -- 批处理命令 if exists (select * from sys.databases where name='goods') -- 如果已经有了订货管理数据库goods drop databases goods -- 删除数据库 go create databases goods -- 创建临时数据库 go use goods go create table good ( Goodno char(4) not null , Goodname varchar(10) not null, Price smallint not null ) go
