declare@tabvarchar(20)whileexists(select*fromsysobjectswherextype='u')beginselecttop1@tab=namefromsysobjectswherextype='u'exec('droptable'+@tab)end