Home » SQL & PL/SQL » SQL & PL/SQL » sql
sql [message #599766] Mon, 28 October 2013 13:58 Go to next message
walls
Messages: 1
Registered: October 2013
Location: India
Junior Member
hi,
the query below said ORA-00907: missing right parenthesis...can any 1 plizz check out..!!



CREATE TABLE departments (
name VAR_CHAR(16) NOT NULL,
id NUMBER(6),
location NUMBER(4),
chairperson NUMBER(6),
budget NUMBER(9,2),
PRIMARY KEY (id)
);
INSERT INTO departments VALUES ('BIOLOGY', 100, 2510, null,100000);

INSERT INTO departments VALUES ('CHEMISTRY', 110, 2510, null, 50000);

INSERT INTO departments VALUES ('COMPUTER SCIENCE', 120, 2530, null, 110000);

INSERT INTO departments VALUES ('ELECTRIC. ENG.', 130, 2530, null, 145000);

INSERT INTO departments VALUES ('FINE ARTS', 140, 2520, null, 10000);

INSERT INTO departments VALUES ('HISTORY', 150, 2520, null, 20000);

INSERT INTO departments VALUES ('MATHEMATICS', 160, 2580,null, 5000);

INSERT INTO departments VALUES ('MECHANIC', 170, 2520,null, 100000);

INSERT INTO departments VALUES ('PHYSICS', 180, 2560,null, 300000);


SELECT *FROM departments

[Updated on: Mon, 28 October 2013 14:01]

Report message to a moderator

Re: sql [message #599767 is a reply to message #599766] Mon, 28 October 2013 14:04 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's no VAR_CHAR, but VARCHAR (which should not be used) so - your choice is, actually, VARCHAR2.
Previous Topic: External Tables
Next Topic: Query for the below requirement
Goto Forum:
  


Current Time: Fri Apr 19 15:24:10 CDT 2024