Tricks and tips

Revision as of 21:14, 16 January 2007 by Claratte (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SQL

Permut two rows according to their id

UPDATE some_table SET id = a + ABS(id - b) WHERE order_num in (a , b)