MSSQL is terrible for lacking some seemingly straightforward functionality- like the ability to drop a table only if it exists and has no rows. Salt to taste: — TODO: accept an array of tables, check all of them for existence and zero rows, then perform drop CREATE PROCEDURE DropTableIfEmpty(@t as nvarchar(max)) AS BEGIN SELECT @t […]