清空表中的数据
用存储过程可以清空表中的数据存储过程怎么写啊?谢谢 --------------------编程问答-------------------- create proc EXECUTE
@sname varchar(20),
as
delete from 表名 where sname=@sname
go
调用:EXECUTE EXECUTE 'aaa' --------------------编程问答-------------------- 清空所有数据为
create proc delAllData
as
delete from 表名
--------------------编程问答-------------------- truncate table tablename --------------------编程问答-------------------- 在SQL存储过程中,以EXCECUTE IMMEDIATE 执行
alter table ... activate not logged initially with empty table
CREATE PROCEDURE HUANGDK.truncat_t ( )
DYNAMIC RESULT SETS 1
------------------------------------------------------------------------
-- SQL 存储过程
------------------------------------------------------------------------
P1: BEGIN
declare str_sql varchar(4000);
SET str_sql='alter table ttt activate not logged initially with empty table';
EXECUTE IMMEDIATE str_sql;
END P1 --------------------编程问答--------------------
补充:.NET技术 , ASP.NET