Problems encountered in sqlserver

Problem: When a query sqlserver data, if the field contains parentheses, then the query, this field will sqlserver as a function to handle, resulting in an error (therefore recommended that field do not use parentheses and other special characters).

Such as:

SELECT flood standard (normal use), before the flood season, STCD FROM TABLE

result:

Solution: The field queries using the "[]" to pack up.

SELECT [flood standard (normal use)], before the flood season, STCD FROM TABLE

 result:

 

Guess you like

Origin www.cnblogs.com/cq-yangzhou/p/11119154.html
Recommended