This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sql server keyword 'user'

 
Alana Sparx
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i know that strictly speaking this isn't JDBC, but it could be!

The following sql statement fails in Sql Server:

because the table name 'user' is a keyword. How can I retrieve the data from this table?


don't work!

NB, Some other clown designed the schema.

Many thanx
 
Alana Sparx
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah! Bless the advent of the square bracket, a la


toodle-pip.
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alana Sparx:
Ah! Bless the advent of the square bracket, a la


toodle-pip.


On at least many other databases, "USER" would have worked; on some databases, the quotes make the column name case-sensitive, where it normally is not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic