Brent’s Bad Idea Jeans: Stop People From Changing Tables with This One Trick
21 Comments
Developers hate his bad idea jeans: Transact-SQL CREATE VIEW dbo.StopThemDead WITH SCHEMABINDING AS SELECT COUNT(*) FROM dbo.Table1 UNION ALL SELECT COUNT(*) FROM dbo.Table2 UNION ALL.... 123456 CREATE VIEW dbo.StopThemDead WITH SCHEMABINDINGASSELECT COUNT(*) FROM dbo.Table1UNION ALLSELECT COUNT(*) FROM dbo.Table2UNION ALL.... Presto, the schemabinding option means no one can change the underlying tables. (At least, until they…
Read More