Wednesday, March 28, 2012

invalid syntax near keyword default (was "Why do I get the following error?")

select * from CurrencyMaster where default=true
invalid syntax near keyword default.You cannot have a reserved word as a field name without enclosing it in brackets.
Therefore :

select * from CurrencyMaster where default=true
doesn't work, and
select * from CurrencyMaster where [default]=true

will probably work. (Haven't tested it myself tho...)

No comments:

Post a Comment