1 1andyw Registered User. Local time Today, 01:21 Joined Feb 15, 2004 Messages 12 May 7, 2004 #1 My query reads: "CREATE TABLE customers (id INT auto_increment, name VARCHAR(25))" Access returns a msg box 'Syntax error' and highlights the word 'auto'. What is the correct syntax for the auto_number field?
My query reads: "CREATE TABLE customers (id INT auto_increment, name VARCHAR(25))" Access returns a msg box 'Syntax error' and highlights the word 'auto'. What is the correct syntax for the auto_number field?
J Jon K Registered User. Local time Today, 06:21 Joined May 22, 2002 Messages 2,209 May 7, 2004 #2 CREATE TABLE customers (id autoincrement, name VARCHAR(25))
1 1andyw Registered User. Local time Today, 01:21 Joined Feb 15, 2004 Messages 12 May 7, 2004 #3 Thanks, Jon. I have the table created successfully. To populate the table I wrote: "INSERT INTO customers VALUES ("Jones")". The message box says I did not include enough fields. How would you word the sql to populate one or more new records? Andy
Thanks, Jon. I have the table created successfully. To populate the table I wrote: "INSERT INTO customers VALUES ("Jones")". The message box says I did not include enough fields. How would you word the sql to populate one or more new records? Andy
J Jon K Registered User. Local time Today, 06:21 Joined May 22, 2002 Messages 2,209 May 7, 2004 #4 INSERT INTO customers ([Name]) VALUES ("Jones") VALUES can insert only one record. You can insert more than one record from another table using SELECT:- INSERT INTO customers ([Name]) SELECT [Name] from [AnotherTable]
INSERT INTO customers ([Name]) VALUES ("Jones") VALUES can insert only one record. You can insert more than one record from another table using SELECT:- INSERT INTO customers ([Name]) SELECT [Name] from [AnotherTable]
1 1andyw Registered User. Local time Today, 01:21 Joined Feb 15, 2004 Messages 12 May 7, 2004 #5 Thanks, Jon.