Table Variable with constraint bug
Glenn
Posts: 2 Bronze 4
in SQL Prompt
Appears that "Global/Lists/Commas/Place Commas before items" and "Statements/Schema (DDL)/Data types and constraints/Place constraints on new lines" is causing weird comma placement and constraint alignment on table variables.
Sample code:
DECLARE @work TABLE( key1 VARCHAR(4)
, key2 VARCHAR(9)
, val1 VARCHAR(50)
, val2 VARCHAR(25),
PRIMARY KEY CLUSTERED( key1, key2 ));
CREATE TABLE #work ( key1 VARCHAR(4)
, key2 VARCHAR(9)
, val1 VARCHAR(50)
, val2 VARCHAR(25)
,
PRIMARY KEY CLUSTERED( key1, key2 ));
Sample code:
DECLARE @work TABLE( key1 VARCHAR(4)
, key2 VARCHAR(9)
, val1 VARCHAR(50)
, val2 VARCHAR(25),
PRIMARY KEY CLUSTERED( key1, key2 ));
CREATE TABLE #work ( key1 VARCHAR(4)
, key2 VARCHAR(9)
, val1 VARCHAR(50)
, val2 VARCHAR(25)
,
PRIMARY KEY CLUSTERED( key1, key2 ));
Tagged:
Answers
Thank you for reporting this. I've managed to reproduce the problem locally and I've created a bug (reference: SP-6637) to track it.
Best regards,
Frederico
Redgate Software
We have released SQL Prompt 8.2.4.2825 which resolves this issue.
You can update here:
http://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_8.2.4.2825.exe
Thanks for reporting!
Best,
Michael
Technical Lead, SQL Monitor