Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rkpamidi
Starting Member
5 Posts |
Posted - 2001-07-07 : 00:49:32
|
| I have a problem with the procedure to truncate rows in all the tables of a database. Please find the procedure below andsuggest a solution for the problem.Are there any other ways of doing this?CREATE procedure timetable_truncate@tabname varchar(50)=""asdeclare cur cursor forselect name from timetable..sysobjects where type='U' order by name open curfetch cur into @tabnamewhile(@@fetch_status =0)begintruncate timetable..[@tabname]fetch cur into @tabnameendclose curdeallocate cur |
|
|
|
|
|