Try this:
declare @tblname int
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
In the case of dependency, this won't truncate the table. It'll throw the error at runtime. First truncate all the dependent table and then try this.
--Amit