Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

MySQL isn't recognising DELIMITER [closed]

I'm trying to create a PRIMARY KEY AUTO_INCREMENT with a prefix. I believe I've found the method, but for some reason I can't run the DELIMITER statement. The below error shows, (so basically it's ...
CannonJacks's user avatar
-3 votes
1 answer
119 views

How to make `id` automatically set by a query instead of `AUTO_INCREMENT` [duplicate]

I have multiple tables for different kinds of objects. However, the ID of every object must be unique not only among objects of the same type but also across all objects of different types. In other ...
ShkiperDesna's user avatar
1 vote
1 answer
45 views

NotNullViolation Error When Inserting Data into PostgreSQL Table with Non-Nullable ID Column

I'm working on inserting data from a Pandas DataFrame into a PostgreSQL table using Python. The table structure is as follows: CREATE TABLE sales ( id BIGINT NOT NULL, -- Primary Key tahun ...
AmaniAli's user avatar
  • 321
0 votes
1 answer
53 views

How to generate unique grouped autoincrement document id's? [duplicate]

I need to make some tables which are able to auto-increment unique document names for each month of the year based on the date of each documnet type. I think it will be a good idea to make it as a ...
Lasse Staalung's user avatar
-2 votes
1 answer
90 views

Key isn't auto-incrementing

I have a view model class setup like this: using System.ComponentModel.DataAnnotations; namespace Proj1.Models { public class Groups { [Key] public int Id { get; set; } ...
Bob Gatto's user avatar
1 vote
2 answers
65 views

Add 1 to number from cell in last row of sheet in other workbook and enter on sheet in currently open workbook

I have a "My Quote" template workbook which has a quote number in cell "I1" of the "Quote" sheet. Upon opening that workbook I want to go to another (unopened) "...
Peter's user avatar
  • 11
0 votes
1 answer
96 views

How can i implement a auto Increment pk in a interative grid

I tried to implement an auto increment on my default interactive grid page by following several tutorials on YouTube, but each tutorial taught differently and none solved my problem, the new line is ...
Diogo Rafael Soares's user avatar
0 votes
1 answer
36 views

C# - Adjust an auto-incremented field of an object when item is removed from Bindinglist

I have a class for a "Car" object which I have added several instances of to a Bindinglist attached to a Datagridview. I am trying to make a specific field of this object increment every ...
Saturn's user avatar
  • 3
0 votes
2 answers
93 views

Autoincremental values for multiple columns in snowflake

is there a way to create sequence without any gaps in snowflake. I cannot use row number as I am running the updates/inserts multiple times which will end up creating same row numbers 1 to n on every ...
rajalakshmim's user avatar
0 votes
1 answer
52 views

How to create table with identity column using entity framework core code first migration to oracle db?

This is the code generated by ef core after we do add-migration migrationBuilder.CreateTable( name: "Provinces", ////schema: "some schema", columns: table => new ...
KoolKabin's user avatar
  • 17.5k
0 votes
0 answers
48 views

Mysql increment field didn't work property with mybatis plus

1.entity public class SaledData implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; ...
Mark X's user avatar
  • 1
0 votes
0 answers
42 views

How to auto-increment a composite key as a calculated field?

How is it possible to auto-increment a composite key (string text) in Excel while satisfying two logical conditions? I am trying to construct a calculated field [transaction_id] by satisfying two ...
Lyn Stanford's user avatar
1 vote
2 answers
106 views

Auto Increment value for non-primary key column

In my MariaDB I have two tables project and issue, the issue table contains all issues created for all projects create table if not exists Project( id integer PRIMARY KEY auto_increment, `name` ...
david's user avatar
  • 23
0 votes
0 answers
301 views

dbt Incremental Model Issue with Snowflake Autoincrement Column

I am encountering an error while utilizing an autoincrement column named col_2 in Snowflake within my dbt incremental model. The column col_2 is defined in Snowflake as: col_2(18,0) autoincrement ...
Idan Kogan's user avatar
0 votes
2 answers
134 views

How to definitelly fix Potgresql autoincrement problem with unique constraint violation

How to fix Potgresql autoincrement problem with unique constraint violation? Is there some option in Postgres which set up sequence value after any insert properly? I am alway getting error when ...
Čamo's user avatar
  • 4,124
0 votes
0 answers
25 views

Auto increment ID in kotlin xml

When I wanted to copy and paste in xml, the id was automatically increasing. I deleted Android Studio and downloaded it again. That feature is gone and I'm having a lot of problems. How can I turn on ...
beyza atay's user avatar
0 votes
1 answer
67 views

Laravel Pest test ignore not resetting mariadb autoincrement ids

I have a laravel pest test that checks a redirect after data is submitted to a controller to create a client. it('redirects to the clients show page', function () { $user = User::factory()->...
FMK's user avatar
  • 1,120
0 votes
1 answer
46 views

Generate Automatic increment for "alt" html field on images

I'm using a php gallery script and I need to add numbers (auto increment) in the "alt" field (images). I already tried several options from stackoverflow and unfortunately I didn't succeed. ...
carinho's user avatar
  • 45
0 votes
1 answer
274 views

Setting auto-increment after filling table (Firebird) with existing data (from SQL Server)

I have a table in SQL Server. Its PK, ID, is of type INT and is auto-incremented. The task I have is to get this table in a Firebird database (version 4.0.4). Remarks: we have a website that uses this ...
Anthony Voronkov's user avatar
0 votes
1 answer
269 views

How to create incremental counter in mulesoft dataweave

We have multilevel array so we are using transformation of multiple map function. In this case how to assign a field ID with incremental value. Input: [ { "productNo": "00011111&...
Magda's user avatar
  • 17
1 vote
1 answer
119 views

How to increment ++ from an existing value

I am working on an app to track winter bird feeder counts. I am using ++ to increment and -- to decrement. When I try to increment an existing value, the increment re-starts at zero. For instance, if ...
littleoldlady's user avatar
0 votes
0 answers
23 views

Is it possible to read separately an autoincremental key relative to another id [duplicate]

I'm developing a database similar to the Tinder database. And encountered error 1075 while creating the message table. create table message ( message_chat_id BIGINT UNSIGNED, message_id BIGINT ...
ghoultay's user avatar
0 votes
0 answers
48 views

Auto assignment of the C# application version in Visual Studio

I've tried a lot of different options: 1) changed the versions in the solution properties via Visual Studio 2) edited the file.csproj 3) created applications .Net Framework 4.8 and .NET 6 / 7 4) Used ...
ArtK's user avatar
  • 1
0 votes
1 answer
79 views

Rename Images and save them with the new name and incrementing each 20

I have 1000 jpg files with file names:1_nb_1_0.0164032559841871, 1_nb_1_20.0611820686609, and I want to rename those 1000 with new names by incrementing two characters such as rename to this name:...
MezRasol's user avatar
0 votes
2 answers
209 views

Is an autoincrement key always guaranteed to increase in T-SQL?

I am using an AUTOINCREMENT PRIMARY KEY in-luau of a timestamp for ordering purposes in a GROUP BY clause. This is a minimal example to illustrate only: CREATE TABLE Items( ItemId BIGINT ...
sashoalm's user avatar
  • 78.5k
2 votes
1 answer
427 views

Creating an autoincrement column via sqlalchemy

I am using a Postgresql database via sqlalchemy orm. The table is really basic: import sqlalchemy as sa from sqlalchemy.orm import Mapped from sqlalchemy.orm import mapped_column class Network(Base): ...
oakca's user avatar
  • 1,558
0 votes
1 answer
57 views

SQL not accepting AUTO_INCREMENT

New programming learner here. I am trying to create a table for blood donors, and have the id be automatically incremented upon registering new donors, but sql gives an error around auto_increment as ...
ProgrammingLearner2023's user avatar
-2 votes
1 answer
99 views

AUTOINCREMENT vs No AUTOINCREMENT in SQLite

I put and did not put AUTOINCREMENT for id in person table as shown below: CREATE TABLE person ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT # ↑↑↑↑↑↑↑↑↑↑↑↑↑ ); CREATE TABLE person ...
Super Kai - Kazuya Ito's user avatar
0 votes
1 answer
217 views

How to create a string sequence in SQLAlchemy

I am currently developing an API for invoices. And I want to create an Invoice table with invoiceNumber field that would be auto incrementing but as a string. Something like this: INV00001 INV00002 ...
Vitalij Gurin's user avatar
0 votes
1 answer
44 views

Obtaining a combined key (year/number) in mysql with innoDB storage engine

I would like to create a combined key in an innoDB table that already has an "ID" column with auto incrementing value that works as primary key. Assuming we have the following "...
Alex's user avatar
  • 13
0 votes
0 answers
10 views

I modified the auto-increment on an index and when I create a new record I get 2 new records

When I create a new record I get 2, each with a different index value. I wanted to add auto increment to my index, and I did, but it was already defined as auto-increment, so I did it twice!! How can ...
user1897618's user avatar
2 votes
0 answers
143 views

Assigning a persistent and unique ID to instances of a python class

There are a number of threads on SO dealing with a similar question, e.g. How to create a unique and incremental ID in a Python Class Auto-incrementing IDs for Class Instances How do you create an ...
Nick's user avatar
  • 3,058
-1 votes
1 answer
47 views

innodb missing auto-increment values [duplicate]

I am not experienced in this area. Can you tell me why autoincrement skips values? This is my table: CREATE TABLE `orders` ( `id` int NOT NULL AUTO_INCREMENT, `product_id` int NOT NULL, `...
beslana's user avatar
3 votes
1 answer
469 views

Is it guaranteed that bigserial column is unique across all partitions of a partitioned table?

I created the partitioned table in Postgres 15 with composite primary key: CREATE TABLE T ( id bigserial NOT NULL, date date, ..., PRIMARY KEY(id, date) ) PARTITION BY RANGE (...
user3440012's user avatar
0 votes
1 answer
62 views

Auto incrementing does not occur when adding an item in PostgreSQL using Hibernate

I created a table in PostgeSQL with data for a person and marked the column "id" with the type 'SERIAL' as 'primary key', 'not null' CREATE Script: CREATE TABLE people ( id serial NOT NULL,...
Артем Лебідь's user avatar
1 vote
1 answer
319 views

What Liquibase XML element to use to reset AUTO INCREMENT counter for a column in MySQL?

In MySQL you would use this kind of SQL to reset the AUTO INCREMENT counter for a table: ALTER TABLE my_table AUTO_INCREMENT = 200; What is the corresponding XML element to use in Liquibase? I'm ...
Neek's user avatar
  • 7,381
0 votes
1 answer
46 views

How to automatically increment Django IntegerField

I have a field in my model Step=models.IntegerField() I call it normally in the template with the following: {{user.step}} Now I want this field to automatically increase after every year What is ...
Raji Muhammad's user avatar
0 votes
0 answers
75 views

Change ID in MySQL table permanently [duplicate]

How can I change the value of the ID in a MySQL table, for example, to "9999," while keeping the remaining IDs (1-315) unchanged and ensuring that the next autoincrement value is actually ...
user2144969's user avatar
0 votes
0 answers
39 views

PHP file_put_contents() make a primary key that auto_increments

this is my first time asking a question since I cant find any better solutions for my problem. I got a task to make a form by website that uses file_put_contents() for book data library. My code ...
Faisal Wildan H's user avatar
1 vote
2 answers
65 views

MySQL insert varchar value into int auto increment column

I noticed strange MySQL behaviour on projects staging server. Given: create table test_table ( id int auto_increment, name varchar(64) not null, constraint test_table_pk primary ...
Marius's user avatar
  • 25
0 votes
0 answers
124 views

Ms access database has skipped an auto increment number (ID) after repare. How to restore it?

I have Microsoft access database. I have about 1200 records, with attached documents through forms and am generating several reports with it. While doing data entry access just halted and I restarted. ...
Tahir Hussain's user avatar
-1 votes
2 answers
513 views

SQLite integer primary key without assignment/autoincrement

I have a table which requires unique IDs for each row, and which requires them to be stable if the database is rebuilt (so I can't just use rowid), but does not require that they be unique over the ...
P...'s user avatar
  • 685
0 votes
1 answer
117 views

Add incremented variable in jquery ajax success handler

I want to increment the value of a variable ii, but its value does not change. If I move ii++; before the alert function call, it increases but the value set to #spanstatus is always 0. How do I ...
Hida's user avatar
  • 154
0 votes
1 answer
1k views

Entity Framework trying to add null primary key with auto increment

I'm starting a new Blazor project using Entity Framework 7 and an existing database. I created a class refering to a existing table from my database. public class IEA_EtatsDemandes { public ...
Valter's user avatar
  • 73
0 votes
1 answer
99 views

MySQL - Single auto increment with multiple primary keys or a safe way for insert with max()+1 in MySQL

I am looking for a solution two have my second primary key column to be auto incremented depending on the first primary key. Think about the following example case to comprehend the aspects of my goal:...
Sercan Samet Savran's user avatar
-1 votes
2 answers
750 views

Numbering invoices yearly and different structures with SQL and PHP [duplicate]

I'm a beginner in SQL and I tried looking for an answer without any luck. I would like to generate invoice numbers automatically with the following distinctions: I have 2 different structures ...
TheGix's user avatar
  • 110
0 votes
1 answer
1k views

How to keep the auto-increment function (in SQL IDENTITY) for ID after importing from Access to SQL Server?

I'm importing tables from Access to SQL Server. The column ID in Access is auto-increment, but in SQL Server I must enter every time the ID. It's important to say that there're records in the imported ...
zaraboy's user avatar
  • 19
0 votes
1 answer
259 views

Auto increment by group mariaDB

I have this MariaDB table. id order name forum_id 1 1 .... 1 2 2 .... 1 3 3 .... 1 4 1 .... 2 5 2 .... 2 where id is PK. ...
aoz's user avatar
  • 9
0 votes
1 answer
499 views

Sequelize ORM - Auto-increment function not working for new user creation in database

I use sequelize ORM. I have created a register route and controller to create new user. I created a new user with AVA test, but the auto-increment function isn't working properly. Despite being the ...
vetheve's user avatar
  • 219
0 votes
1 answer
43 views

root - ERROR - post - 46 - Record creation failed: (1062, "Duplicate entry '23SNS0002' for key '' ")

from django.db import models from django.utils import timezone import datetime class Employee(models.Model): emp_id = models.CharField(editable=False,unique=True,max_length=10,default=None) def save(...
Gokulnath's user avatar

1
2 3 4 5
54