I'm using a T-SQL script to remove all constraints and all tables in my database to give me a clean slate upon execution, it seems to work fine for constraints, but when adapting the segment to clear my tables out it's giving me an error message, code is as follows:
declare @tableCommand varchar(255) 
declare tableCursor cursor for
    select 'drop table '+ t.name
    from sys.tables t
    where t.type = 'U'
open tableCursor 
fetch next from tableCursor into @tableCommand 
while @@fetch_status = 0 begin
    exec @tableCommand
    fetch next from tableCursor into @tableCommand
end 
close tableCursor 
deallocate tableCursor
As I say, a similar segment of code works fine to drop my constraints, but with this code I just get the error:
Msg 2812, Level 16, State 62, Line 15
Could not find stored procedure 'drop table calendar'.
Any ideas?

