Answers for "Auto increment id"

SQL
4

id increment ms sql server

CREATE TABLE Persons (
    Personid int IDENTITY(1,1) PRIMARY KEY,
    LastName varchar(255) NOT NULL,
    FirstName varchar(255),
    Age int
);
Posted by: Guest on April-29-2020
0

what if auto increment id used up

CREATE TABLE `tbl_new` (
    `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    PRIMARY KEY (`id`)
) AUTO_INCREMENT=2200000000;

RENAME TABLE `tbl` TO `tbl_old`, `tbl_new` TO `tbl`;
Posted by: Guest on June-24-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language