Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Auto Increment problem

sc.5502@gmail.com's profile image sc.5502@gmail.com posted 9 months ago in General Permalink

How does Auto Increment work? I follow the procedure but all I get is the following error message see attached

1 attachment(s):
  • Capture2
ansgar's profile image ansgar posted 9 months ago Permalink

On MariaDB or MySQL, you will need to make a column also a primary or unique key to get no errors.

sc.5502@gmail.com's profile image sc.5502@gmail.com posted 9 months ago Permalink

I am running MS SQL Server Express not MariaDB or MySQL.

ansgar's profile image ansgar posted 9 months ago Permalink

In that case issue #1230 is related here.

sc.5502@gmail.com's profile image sc.5502@gmail.com posted 9 months ago Permalink

I am new here, what is issue #1230?

itzprobablyme's profile image itzprobablyme posted 6 months ago Permalink

This is because HeidiSQL is formatting the query for MySQL -

This is what HeidiSQL does -

CREATE TABLE "sample_table" ( "row_num" INT NOT NULL AUTO_INCREMENT, PRIMARY KEY ("row_num") )

Just copy the query generated by HeidiSQL from the output window and change as follows:

CREATE TABLE "sample_table" ( "row_num" INT IDENTITY(1,1) PRIMARY KEY )

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.