Toad World® Forums

Domain constraint names for SQL Server

I see posts about using the <%columnname%> variable for domains in the name of contraints. However, when I use it with a SQL Server database as such:

chk_<%columnname%>

and then put it on a column named Downtime, I get

chk_[Downtime]

SQL Server doesn’t like chk_[Downtime]. How do I remove the brackets? I can’t find the answer.

Thank you.

Tammy

Hi,

press F9 to open SQL Script Generation form. On tab Detailed Settings the first checkbox is Delimited Identifiers (Use Brackets). Make sure it is not enabled and generate SQL.

Regards,

Vaclav