Hide a table in sql server management studio

Apparently in sql server you can mark any table as a system table using EXEC sys.sp_MS_marksystemobject and then Management studio will hide it automatically. I ran into this because the docs say that Entity Framework 6 stores its code-first migration snapshots in a table called __MigrationHistory but I couldn’t find it because it’s hidden since it’s marked as a system table.

July 6, 2023 · 1 min · Brandon Pugh

Use a table variable to hold a list of values

You can store a “list” of values in sql with a table variable. DECLARE @listOfIDs TABLE(id INT); INSERT INTO @listOfIDs SELECT id FROM Transactions WHERE USER='bob';

July 4, 2023 · 1 min · Brandon Pugh