DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SQL
Reorder Table Primary Key Index After Deleting Some Rows
UPDATE tbl SET catid = (SELECT COUNT(*) FROM tbl t WHERE t.catid <= tbl.catid);
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Reorder
#Table
#Primary
#Key
#Index
#After
#Deleting
#Some
#Rows
ADD COMMENT
Topic
COMMENT
Name
1+4 =
Submit