Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have following error when i m using orderby clause with postgres database


here is my query
------------------
SQL
Update Delhi set  assignedtouserid='L567' where flag=0 ORDER BY locality DESC limit 100
Posted
Updated 11-Aug-14 21:32pm
v2
Comments
StM0n 12-Aug-14 3:31am    
Sorry, but it seems, that you forgot your error message.

1 solution

What do you expect the ORDER BY ... DESC and LIMIT clauses to do in an UPDATE query?
Remove them. They are for SELECT queries only.
 
Share this answer
 
Comments
OriginalGriff 12-Aug-14 3:34am    
You have to wonder... :thumbsup:
Ashi0891 12-Aug-14 13:45pm    
True that.

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