Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql reset auto increment id

SET  @num := 0;

UPDATE your_table SET id = @num := (@num+1);

ALTER TABLE your_table AUTO_INCREMENT =1;
Comment

mysql auto increment after delete

set @autoid :=0; 
update Table_Name set AutoIncremented_Column = @autoid := (@autoid+1);
alter table Table_Name Auto_Increment = 1;

@Zenonymous
Comment

mysql remove auto increment

ALTER TABLE mytable CHANGE my_col my_col INT(10) UNSIGNED NOT NULL
Comment

PREVIOUS NEXT
Code Example
Sql :: kill a pid redshift 
Sql :: change mysql version to 5.7 in ubuntu 
Sql :: date sql get the last week count 
Sql :: SQL DEFAULT Constraint With Alter Table 
Sql :: how to query without duplicate rows in sql 
Sql :: how to copy data in sql 
Sql :: sql any 
Sql :: connexion mysql 
Sql :: mysql delete duplicate rows but keep one 
Sql :: create table split string function in sql server 
Sql :: sql delete all values in a column 
Sql :: in mysql workbench contnent not feching 
Sql :: mysql find duplicates in same table 
Sql :: incompatible sql_mode=only_full_group_by 
Sql :: nullif postgresql 
Sql :: postgresql Create a new role with a username and password 
Sql :: how to check if a column is null in sql 
Sql :: drop sequence 
Sql :: stored procedure to delete data from table in mysql 
Sql :: round in sql server 
Sql :: between sql 
Sql :: distinct sql 
Sql :: sql server to uppercase 
Sql :: get number of columns sql 
Sql :: how to join tables in sql 
Sql :: postgresql random phone number 
Sql :: create table with index mysql 
Sql :: datediff in sql 
Sql :: recursion in sql 
Sql :: sql datitime to date 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =