AutoInc INSERT test

<< Click to Display Table of Contents >>

Navigation:  Tables > Table field types > Autoinc/Primary Key Fields >

AutoInc INSERT test

Previous pageReturn to chapter overviewNext page

AutoInc INSERT INTO table SELECT test

The following SQL test script illustrates

the re-initialization of the target AutoInc field when bulk inserting values into a Paradox table,

the total mess when bulk inserting values into a target AutoInc field of a dBASE 7 table.

Do select the appropriate target settings to test the Paradox and dBASE 7 AutoInc behaviours.

CREATE TABLE TestIdxInteger (
  idx INTEGER
, TextField VARCHAR(20)
);

INSERT INTO TestIdxInteger VALUES (3, 'GHI');
INSERT INTO TestIdxInteger VALUES (4, 'JKL');
INSERT INTO TestIdxInteger VALUES (5, 'MNO');
 
CREATE TABLE TestIdxAutoInc (
  idx AUTOINC
, TextField VARCHAR(20)
);
 
INSERT INTO TestIdxAutoInc SELECT * FROM TestIdxInteger;
INSERT INTO TestIdxAutoInc SELECT * FROM TestIdxInteger;
 
SELECT * FROM TestIdxAutoInc;

The resulting dBASE 7 table with successive manually typed TextField input, if the AutoInc field is not PRIMARY KEY indexed:
AutoInc-SQL-INSERT-dBASE7

__________________________
PdxEditor Application Help, 18 May 2026; © 2010-2026 Niels Knabe