mysql - .sql file failing to execute -


i in final steps of submitting lab school final condition being have copy/paste of commands corresponding question sql file named 'lab2.sql'. i've done when attempt execute file receive follow errors:

source lab2.sql -bash: /*name: no such file or directory : no such file or directory -bash: /*section:: no such file or directory -bash: /*lab: no such file or directory -bash: /*can: no such file or directory -bash: /*consequently,: no such file or directory -bash: /*is: no such file or directory -bash: /*use: no such file or directory -bash: lab2.sql: line 12: syntax error near unexpected token `(' 'bash: lab2.sql: line 12: `alter table vendor add constraint vendor_v_code_pk primary key (v_code); 

portion of 'lab2.sql' file.

/*name*/ /*student id*/ /*section: b*/ /*lab 2*/  /*can v_code column accept null values?: no*/ /*consequently, product entity existence-dependent of vendor entity?: yes*/ /*is product entity optional vendor entity?: yes*/  /*use alter command add primary key constraint on v_code of vendor table. name constraint vendor_v_code_pk: */  alter table vendor add constraint vendor_v_code_pk primary key (v_code);  /*write sql command create product table (defined below) along defining constraints a, b, c , d.  allow naming of constraints b) c) , d) */ /*constraint name should start table name, underscore, column name, underscore symbol constraint itself: */  create table product (p_code varchar(10) not null primary key, p_descript varchar(35) not null unique, p_indate date not null, p_qoh integer not null check (p_id>0), p_min integer not null check (p_id>0), p_price numeric(9,2) not null, p_discount numeric(5,2) not null, v_code integer not null); 

i apologize if comes silly question. beginning use sql


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -