Ask Your Question
0

Primary key fields are starting at 1 instead of 0

asked 2018-09-06 03:12:35 +0200

paradigm gravatar image

Please forgive me because this isn't actually a LO issue, (it happens in Workbench too) but I'm new at using LO with MySQL and I'm trying to figure some things out.

With auto increment on, in an INT(10) primary key field, when I enter data either though LibreOffice Base or directly through the workbench, the first record starts at 1 instead of 0 (like I'm used to). Is that supposed to happen, or is something wrong?

Specs: LibreOffice Version: 6.1.0.3 Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1 CPU threads: 6; OS: Linux 4.15; UI render: default; VCL: gtk2; Locale: en-US (en_US.UTF-8); Calc: CL

Ubuntu version 18.04.1 LTS (Bionic Beaver)

mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper

Using JDBC mysql-connector-java-8.0.12.jar

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-09-06 03:59:10 +0200

Ratslinger gravatar image

Hello,

Where an auto increment begins depends upon the database being used. Many start at 1 but you can start or restart a sequence at a number you wish using SQL. The numbering is pretty much meaningless anyway as far as what number is being used.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-09-06 03:12:35 +0200

Seen: 108 times

Last updated: Sep 06 '18