Top "Auto-increment" questions

a database constraint that automatically increases from the last record when making an INSERT

Can you access the auto increment value in MySQL within one statement?

I have a MySQL database which contains a table of users. The primary key of the table is 'userid', which …

sql mysql insert auto-increment
Setting SQLAlchemy autoincrement start value

The autoincrement argument in SQLAlchemy seems to be only True and False, but I want to set the pre-defined value …

python sqlalchemy auto-increment
Changing primary key int type to serial

Is there a way to change existing primary key type from int to serial without dropping the table? I already …

postgresql primary-key auto-increment
Upper limit for autoincrement primary key in SQL Server

What is the upper limit for an autoincrement primary key in SQL Server? What happens when an SQL Server autoincrement …

sql sql-server auto-increment
Reset the row number count in SQLite3/MySQL

I am using SQLite3. I load a table with say 30 rows using integer as Primary ID and it auto-increments. Now …

mysql sql sqlite auto-increment
Should I implement auto-incrementing in MongoDB?

I'm making the switch to MongoDB from MySQL. A familiar architecture to me for a very basic users table would …

auto-increment uuid mongodb
Defining Composite Key with Auto Increment in MySQL

Scenario: I have a table which references two foreign keys, and for each unique combination of these foreign keys, has …

mysql innodb auto-increment composite-key
How to generate AUTOMATIC Number in Teradata SQL

I want to generate AUTOMATIC Number to use TD SQL, for example as follows, CREATE MULTISET TABLE TEST_TABLE ( AUTO_…

sql auto-increment teradata
What size INT should I use for my autoincrement ids MySQL

Currently we're using INT(21)* for all autoincrement id columns in out 30+ table database. We are a blogging site, and have …

mysql primary-key auto-increment
Trying to do LOAD DATA INFILE with REPLACE and AUTO_INCREMENT

I am trying to load a file onto a MySQL database, having the primary key auto_incremented and I would …

mysql replace auto-increment load-data-infile