0

I have one more issues. and it giving only in MSSQL server:

select theme0_.id as id12_, theme0_.user as user12_, theme0_.theme as theme12_ 
from theme theme0_ where theme0_.user=1 

This query is giving error :

Incorrect syntax near the keyword 'user'.

But the query executes properly in MySQL server. Please help me. Thanks!!

Rahul
  • 76,197
  • 13
  • 71
  • 125
Shubhankar
  • 87
  • 3
  • 6
  • 16

1 Answers1

0

That's because USER is a Reserve Word in SQL Server and needs to be escaped in query using square bracket [].

Whereas that's not the case for MySQL Reserve Words

Your query should look like

select [id] as id12_, 
[user] as user12_, 
[theme] as theme12_ 
from theme 
where [user] = 1
Rahul
  • 76,197
  • 13
  • 71
  • 125