Home » RDBMS Server » Server Administration » Whats wrong with this piece of code?
Whats wrong with this piece of code? [message #372756] Wed, 07 March 2001 05:14 Go to next message
Charlie
Messages: 35
Registered: March 2001
Member
I am very new to SQL and I keep getting this error. Whats wrong?

SQL> start prod
SQL> set echo on
SQL> create table PROD
2 (Prodcode number(5) PRIMARY KEY,
3 Description char(20)
4 Packsize number(3)
5 Packunit char(10)
6 Price number(5,2))
7 Input truncated to 1 characters
/
(Prodcode number(5) PRIMARY KEY,
*
ERROR at line 2:
ORA-00922: missing or invalid option
Re: Whats wrong with this piece of code? [message #372758 is a reply to message #372756] Wed, 07 March 2001 05:48 Go to previous messageGo to next message
Charlie
Messages: 35
Registered: March 2001
Member
Thank you very much, it worked well... but now another problem has arised.

SQL> start prod
SQL> set echo on
SQL> create table PROD
2 (Prodcode number(5) PRIMARY KEY,
3 Description char(20),
4 Packsize number(3),
5 Packunit char(10),
6 Price number(5,2));
create table PROD
*
ERROR at line 1:
ORA-00955: name is already used by an existing object

SQL> Input truncated to 1 characters
/
create table PROD
*
ERROR at line 1:
ORA-00955: name is already used by an existing object

Also none of these tables come up in the database, i cannot use the describe command because it says the tables dont exist, whats wrong there?
Re: Whats wrong with this piece of code? [message #375011 is a reply to message #372756] Wed, 18 July 2001 21:48 Go to previous message
ramana
Messages: 51
Registered: December 2000
Member
Hey you are trying to create the table which is already there.

drop the table and try creating again...
and to remove the below statement...
SQL> Input truncated to 1 characters
simply press enter key(carriage return) after you last line of code in the script(.sql) file....
Previous Topic: Report and Save
Next Topic: Using bfiles, oracle 8.1.7 and SUSE-Linux
Goto Forum:
  


Current Time: Sun Jul 07 16:02:04 CDT 2024