Questions tagged [auto-increment]

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

AUTO_INCREMENT is a flag set on a field in a database table that forces the RDBMS to create a unique identifier for the record. This is useful when no other obvious primary key field is apparent in a record.

Useful questions

Related tags

2677 questions
0
votes
1 answer

Date Calculation with Javascript

I am having problem to calculating the date in js. I have calendar picker in my form to pick a start date in the format of mm/dd/yy. With that start date value, I want to insert the incremental date into the rows up to 2 wks. Plz, can anyone…
Danny
  • 1
0
votes
0 answers

How to create sequential (primary) id that is constrained to another id or parameter?

I am creating an Invoicing Application and I am using sequelize. I want the invoice code (or id) to be sequential per (end-) user profile; not throughout the system/database. For instance, let us consider 2 end-users who created 2 invoices. The…
0
votes
2 answers

How can I know in C# if a column of a table in SQL Server is autonumeric?

I need to know in C# if a column of a Table in SQL Server 2005 is autonumeric. I know that if I make a query to get a DataTable and I go through the columns, I could use something like if (table.Columns[i].AutoIncrement) bla bla The problem is that…
Roman
  • 1,691
  • 4
  • 18
  • 35
0
votes
2 answers

MySQL - auto increment by more than one?

I have a table with a primary key using AUTO_INCREMENT. I want this column to start at 1 and increment by 3, but I can't find how to increase the amount the column increments by. ALTER TABLE tbl AUTO_INCREMENT = 3; makes the value start at 3, but…
0
votes
0 answers

(mongoose-sequnce)(mongoose) + Hapijs Adding auto increment in schema field

I want to add an auto-increment field in the MongoDB schema for Interview.round.count field i.e. whenever I will Update the interview field it will automatically increase the Count value with +1 //Here is My Schema Field const mongoose =…
0
votes
1 answer

Google Sheets Auto Increment

I've been building a sheet for work and I want an auto incremented ID, which I can later use to FILTER or VLOOKUP the results back into a dashboard. I've found a "tutorial" online, regarding auto increments and form responses. Tutorial from…
0
votes
4 answers

Auto increment by 2 starting from 1000

I’m using MySQL to make a table: CREATE TABLE school.student( Std_id INT NOT NULL AUTO_INCREMENT, Std_name CHAR(40) NOT NULL, Std_Birth DATE, Std_Group CHAR(2) check(Std_Group in ('G1', 'G2','G3','G4')) ); And I’m trying to make the…
0
votes
1 answer

Conditional segmented auto increment in Postgres

class Ticket{ int id; int caseId; int orderNumber; } Lets imagine I can't change data structure. The order is always have to be without jumps (1,2,4 not good) in range of one caseId, every caseId will have to start from 1. Currently,…
Ludov Dmitrii
  • 425
  • 5
  • 9
0
votes
3 answers

Need assistance with a google sheets formula (incrementing issue)

I'm using this formula to ref from one google sheet to another. =IMPORTRANGE("https://docs.google.com/spreadsheets/d/1HKmUMM4vLvNt9Z20Yc_VyrDx25MxlDQlJjTAXtHl-p4/edit#gid=397776635", "012!D1") I need the part that says 012 to increment, but I need…
0
votes
0 answers

How auto increment work for parallel bulk inserts

I have an application that processes files and transform them to bcp files that are imported into a SQL server database using bulk insert. The application is using parallel threading, and as result multiple bulk insert queries are running at the…
user123
  • 387
  • 1
  • 4
  • 13
0
votes
1 answer

Cakephp 4 save delete auto_increment

I'm doing cakephp4 controller test with phpUnit but when I call save my id auto_increment disapear. My table before save(): Image before save The test: public function testAdd(): void { $this->session([ 'Auth' => [ …
Iria
  • 9
  • 4
0
votes
0 answers

Prestashop : invoice number in database stays at 0

PrestaShop version: 1.6.1 Hosting: ionos PHP version: 5.6 MySQL version: MySQL 5.7 Hi, I recently saved new settings in orders > invoices tab but did left the invoice number at 0 in order for it to continue being auto incremented. My problem is that…
Marion
  • 1
  • 1
0
votes
1 answer

How to auto increment unique number with a prefix?

How can I increment an invoice number with a prefix “INV” and number that increments ‘0001’, ‘0002’, ‘0003’......and so on..... when the user creates an invoice? class Invoice(model.Models): clients_name = models.ForeignKey(Clients,…
KENnie
  • 1
  • 4
0
votes
3 answers

Re-synchronize MySQL auto-increment field

I have a table which has an auto-increment column and I made a mistake last night and accidentally inserted a few bad rows, so I deleted them. Unfortunately this means that I'm "missing" a few ids in the auto-increment field (I inserted two good…
HaLo2FrEeEk
  • 586
  • 7
  • 20
0
votes
1 answer

Can we create an auto increment number sequence on Azure Cosmos Mongo DB API

Can we create an auto increment number sequence on Azure Cosmos Mongo DB API?