Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hai all,

I need for updating order no.

see for example

ID Name orderno

1 ss 4
2 pp 1
3 mm 3
4 nn 2


If i set the orderno 1 for 2 means 2 will automatically change to 1.


any idea guys.
Posted
Comments
Tim Corey 18-Jun-12 9:01am    
This question is not very clear. Could you please explain your issue more? For example, I'm not sure what "I need for updating order no." means. Also, walking us through an example or two would be good (the one you have doesn't really show us the results.
Sandeep Mewara 18-Jun-12 10:27am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

Hi,

I didnt get the question as well.

if you want to update a column than the statement would be something like:

SQL
UPDATE myTable
SET mycol=myvalue, mycol2=myvalue2,...
WHERE mycol*=anyvalue


if you just want to sort a col than use:

SQL
SELECT mycol
FROM mytable
ORDER BY mycol* 
 
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