Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Update statement

Author  Topic 

maddyslayer
Yak Posting Veteran

57 Posts

Posted - 2013-10-15 : 15:47:30
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

38200 Posts

Posted - 2013-10-15 : 15:56:29
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
   

- Advertisement -