Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I did exactly what the expert answer said to do and when i tried to save it the

ID: 3868710 • Letter: I

Question

I did exactly what the expert answer said to do and when i tried to save it the message Syntax error in create Table statement. can you please tell me what i'm doing wrong? The question in, Write a SQL Create Table statement to create the Pet_Owner table, with OwnerID asa surrogate key. Save as CreatePetOwner. This is my anwer using Microsoft Access 2016:

CREATE TABLE PET_OWNER (
OwnerID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
OwnerLastName varchar(50) ,
OwnerFirstName varchar(50) ,
OwnerPhone varchar(15) ,
OwnerEmail varchar(255) );

Once I get ready to save it,or run it, the message Syntax error in CREATE TABLE statement. Can you please tell me what I'm doing wrong?

Explanation / Answer

Hi Buddy,

I have updated the script. We do not need "INT" for the auto-increment column.

CREATE TABLE PET_OWNER2 (
OwnerID AUTOINCREMENT PRIMARY KEY NOT NULL,
OwnerLastName varchar(50) ,
OwnerFirstName varchar(50) ,
OwnerPhone varchar(15) ,
OwnerEmail varchar(255) );

Regards,

Vinay Singh

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote