Top "Auto-increment" questions

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

postgres autoincrement not updated on explicit id inserts

I have the following table in postgres: CREATE TABLE "test" ( "id" serial NOT NULL PRIMARY KEY, "value" text ) I am …

postgresql auto-increment
Set auto increment in Core data iOS

I am using Core Data, and want to set an auto_increment ID as one of the fields which will …

ios core-data xcode5 auto-increment nsmanagedobject
Does Postgresql SERIAL work differently?

I have a postgres table with a SERIAL id. id (serial) name age Insert usually happens from a web application. …

mysql sql postgresql auto-increment
Django BigInteger auto-increment field as primary key?

I'm currently building a project which involves a lot of collective intelligence. Every user visiting the web site gets created …

python django primary-key auto-increment biginteger
Generate an auto increment field in rails

I have a model Token, which has a field token_number that I need to auto increment (starting from 1001), if …

ruby-on-rails auto-increment rails-migrations
How to tell Entity Framework that my ID column is auto-incremented (AspNet Core 2.0 + PostgreSQL)?

Code is simple. Tag.cs entity: public partial class Tag { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public …

asp.net-core entity-framework-core auto-increment npgsql
using Notepad++ how can i make a macro type situation in which a number increments?

for example i have about 500 lines. in the beginning of each line i want to add a number. so in …

macros notepad++ auto-increment increment
Postgresql Sequence vs Serial

I was wondering when it is better to choose sequence, and when it is better to use serial. What I …

sql postgresql auto-increment
Why does MySQL autoincrement increase on failed inserts?

A co-worker just made me aware of a very strange MySQL behavior. Assuming you have a table with an auto_…

mysql innodb auto-increment
Add auto increment back to primary key column in Rails

By mistake I removed the autoincrement option from id field of my table. Can anyone tell me how I can …

ruby-on-rails activerecord auto-increment rails-migrations