Table variable declaration with non-existent sequence fails silently
A batch containing a table variable that references a non-existent sequence fails silently and the remaining statements are ignored.
This should produce the same error as for regular tables and temporary tables.
DECLARE @T table
id integer NOT NULL UNIQUE
DEFAULT NEXT VALUE FOR dbo.NonExistentSequence,
col1 integer NOT NULL PRIMARY KEY
INSERT @T (col1) VALUES (1);
SELECT * FROM @T AS T;
Commands completed successfully.