--写成存储过程 create proc p_process as set xact_abort on begin tran insert B(字段列表) select 对应的字段列表 from A delete B commit tran
insert B(字段列表) select 对应的字段列表 from A truncate table B
--写成存储过程 create proc p_process as set xact_abort on begin tran insert B(字段列表) select 对应的字段列表 from A delete A commit tran
在 zjcxc(邹建) 大哥上改一下:--写成存储过程 create proc p_process as set xact_abort on begin tran insert B(字段列表) select 对应的字段列表 from A TRUNCATE TABLE A表 commit tran
不好意思,最后是删除A表中插入B表的那些记录,不是把A表都删除,该怎么做啊,小弟新手,谢谢!!
--写成存储过程 create proc p_process as set xact_abort on begin tran insert B(字段列表) select 对应的字段列表 from A where 条件 delete from A where 条件 commit tran
--写成存储过程 create proc p_process as set xact_abort on begin tran insert B(字段列表) select 对应的字段列表 from A where 条件 delete B where 条件 commit tran
create proc p_process as set xact_abort on begin tran insert B(字段列表) select 对应的字段列表 from A where 条件 delete from A where 条件 commit tran
各位大哥,那如果要在插入同时,把B表中那个不同的字段写入插入时间的话该怎么写呢?是不是可以这样: create proc p_process as set xact_abort on begin tran insert B(字段列表,新的字段=@变量) select 对应的字段列表 from A where 条件 delete from A where 条件 commit tran
insert B(字段列表,新的字段) select 对应的字段列表,@变量 from A where 条件
谢谢,结帐,lsxaa(小李铅笔刀)!:)
create proc p_process as set xact_abort on begin tran insert B(字段列表,新的字段) select 对应的字段列表,@变量 from A where 条件 delete from A where 条件 commit tran
create proc p_process
as
set xact_abort on
begin tran
insert B(字段列表) select 对应的字段列表 from A
delete B
commit tran
truncate table B
create proc p_process
as
set xact_abort on
begin tran
insert B(字段列表) select 对应的字段列表 from A
delete A
commit tran
create proc p_process
as
set xact_abort on
begin tran
insert B(字段列表) select 对应的字段列表 from A
TRUNCATE TABLE A表
commit tran
create proc p_process
as
set xact_abort on
begin tran
insert B(字段列表) select 对应的字段列表 from A where 条件
delete from A where 条件
commit tran
create proc p_process
as
set xact_abort on
begin tran
insert B(字段列表) select 对应的字段列表 from A where 条件
delete B where 条件
commit tran
as
set xact_abort on
begin tran
insert B(字段列表) select 对应的字段列表 from A where 条件
delete from A where 条件
commit tran
create proc p_process
as
set xact_abort on
begin tran
insert B(字段列表,新的字段=@变量) select 对应的字段列表 from A where 条件
delete from A where 条件
commit tran
as
set xact_abort on
begin tran
insert B(字段列表,新的字段) select 对应的字段列表,@变量 from A where 条件
delete from A where 条件
commit tran