SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Update statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

maddyslayer
Yak Posting Veteran

57 Posts

Posted - 10/15/2013 :  15:47:30  Show Profile  Reply with Quote
I have a table called products as follows

id product
10 X
11 Y
12 Z
14 P
17 Q
18 R

What is the update statement to run so that the table looks like

id product
1 P
2 R
3 Z
4 Q
5 Y
6 X

tkizer
Almighty SQL Goddess

USA
37316 Posts

Posted - 10/15/2013 :  15:56:29  Show Profile  Visit tkizer's Homepage  Reply with Quote
Could you explain in words how the products should be sorted by id?

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000