declare @tblname VARCHAR(255)
declare tbl_cursor cursor for
select name from sys.tables
open tbl_cursor
fetch next from tbl_cursor into @tblname
while @@FETCH_STATUS = 0
begin
print@ tblname
--EXECUTE ('truncate table '+ @tblname)
fetch next from tbl_cursor into @tblname
end
close tbl_cursor
deallocate tbl_cursor
declare tbl_cursor cursor for
select name from sys.tables
open tbl_cursor
fetch next from tbl_cursor into @tblname
while @@FETCH_STATUS = 0
begin
--EXECUTE ('truncate table '+ @tblname)
fetch next from tbl_cursor into @tblname
end
close tbl_cursor
deallocate tbl_cursor
No comments:
Post a Comment