Click here to Skip to main content
15,909,897 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,
I am using MySQL as a backend database. I am using constraint as a field name.

Is there any way i can use it..
Posted
Comments
Sergey Alexandrovich Kryukov 3-Jun-11 2:15am    
This is not a question. You say: "I'm using this and that" and "how can I use it". What "it", if you already using this and that..?
--SA

1 solution

It is usually not a good idea to use reserved words as fieldnames, not in .NET, not in SQL and probably not in any language. Try calling the field a synonym for Constraint, such as Limitation or Constriction.
If you really want to use it it might work by putting `backticks` around the fieldname, like this `Constraint`. In SQL2008 it would work with [brackets] like [Constraint].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900