Answer to Question #301254 in Databases | SQL | Oracle | MS Access for H A

Question #301254

create table guest (

 guestfname     varchar(50) not null,  

 guestlname    varchar(50) not null, 

 guestphone    number(10),

 guestadd      varchar,

 guestID           varchar(10) not null,

 constraint pk_bill primary key (guestphone),

     references room (guestID)   

);

When I run it says missing left parenthesis Why??


1
Expert's answer
2022-02-24T04:30:49-0500

Hi,


The error was on line 5. You had not specified the limit of "guestadd", I have placed the limit to 10 suchh that it reads, "guestadd varchar(10)" .


Below is the correct and final output:


create table guest (


 guestfname   varchar(50) not null,  


 guestlname  varchar(50) not null, 


 guestphone  number(10),


 guestadd   varchar(10),


 guestID      varchar(10) not null,


 constraint pk_bill primary key (guestphone),


  references room (guestID)  


)


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS