Lama Alyousif
Lama Alyousif

Reputation: 11

SQL error command not properly ended

i tried to create this table

 drop table Properties constraint cascade;
 create table Properties (
     Prop_num number(10),
     type varchar2(6) ,
     country varchar2(6) ,
     city varchar2(6) , 
     street varchar2(6) , 
     Room_num number(10) ,
     Prop_description varchar2(100) ,
     price number(10) , 
     constraint Prop_num PRIMARY KEY(Prop_num)
); 

and this error massage show SQL command not properly ended ...

create table contract(

contract_num number(10) ,

type varchar2(6) ,

payment_method varchar2(6),

cust_id char(10) ,

Prop_num number(10),

constraint contract_num PRIMARY KEY(contract_num));

The error appears on all data type Unknow command begining " cont....." - rest of line ignored this error appears on all coulmn

Upvotes: 1

Views: 1994

Answers (1)

Gurwinder Singh
Gurwinder Singh

Reputation: 39497

Assuming you're using Oracle, change

 drop table Properties constraint cascade;

to:

 drop table Properties cascade constraints;

Upvotes: 1

Related Questions