Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Reorder Table Primary Key Index After Deleting Some Rows

UPDATE tbl SET catid = (SELECT COUNT(*) FROM tbl t WHERE t.catid <= tbl.catid);
Comment

PREVIOUS NEXT
Code Example
Sql :: sql developer sql worksheet not showing 
Sql :: How to concatenate text from multiple rows into a single text string in SQL Server 
Sql :: flush user resource mysql 
Sql :: HOW to select specific table data from an mysql databse server: 
Sql :: sqlalchemy core in clause 
Sql :: ring SQLite sqlite_open 
Sql :: SQL authentication error 
Sql :: SQL Primary Key single column 
Sql :: sql declare variable single line 
Sql :: postgresql Change role for the current session to the new_role 
Sql :: sql eomonth(getdate) 
Sql :: shows all databases created by user in ms sql 
Sql :: postgresql not in alternative 
Sql :: Postgresql select join by date - Join rows where a timestamp value is equal to midnight of the date 
Sql :: how to get node value of xml in sql server 
Sql :: mysql top percent 
Sql :: sql xampp gabungan nama awal dan akhir 
Sql :: snowflake last query id 
Sql :: Patch Applied to the Oracle Database 
Sql :: synapse sql table set pk 
Sql :: how we can perform acid Operations in sql with examples 
Sql :: sqlite timer 
Sql :: alter server set options dbserver oracle fdw 
Sql :: select month from date in sql 
Sql :: check or repair mysql database table 
Sql :: case sensitive sql 
Sql :: Prepared statements in mysql 
Sql :: How to take sum of column with same id in "JPQL?" 
Sql :: subconjuntos SQL 
Sql :: postrgres trunc 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =