自增长 增加时不需要对其设置值
仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'nrc_type'中的标识列指定显式值。
insert into nrc_type(t_name,t_memo) values('111','222');
update nrc_type set t_name='222' where t_memo='222';
delete from nrc_type  where t_memo='222';
创建表:
create table products
(
	prod_id char(10) not null,
	vend_id char(10) not null,
	prod_name char(254) not null,
	pro_price decimal(8,2) not null,
	pro_desc varchar(1000) null
)
create table orders
(
	order_num integer not null,
	order_date datetime not null,
	cust_id char(10) not null
)
create table vendors
(
	vend_id char(10) not null,
	vend_name char(50) not null,
	vend_address char(50) ,
	vend_city char(50) ,
	vend_state char(50) ,
	vend_zip char(50) ,
	vend_country char(50)
)
create table orderitems
(
	order_num integer not null,
	order_item integer not null,
	prod_id char(10) not null,
	quantity integer not null default 1,
	item_price decimal(8,2) not null
)
alter table vendors
add vend_phone char(20);
alter table vendors
drop column vend_phone;
drop table custcopy;
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号