473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CREATE Table gives ORA-00904 error

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE "CADBOWNER"."LOGIN"(
  2. "USERID" VARCHAR2 (9 BYTE),
  3. "FIRSTNAME" VARCHAR2 (20 BYTE),
  4. "SURNAME" VARCHAR2 (20 BYTE),
  5. "PHONENO" VARCHAR2 (50 BYTE),
  6. "EMAIL" VARCHAR2 (50 BYTE),
  7. "TRANSIT" VARCHAR2 (50 BYTE),
  8. "ACCESSLEVEL" VARCHAR2 (1 BYTE),
  9. "GRANTACCESS" VARCHAR2 (1 BYTE),
  10. "CREATEDBY" VARCHAR2 (15 BYTE),
  11. "DATEUPDATED" DATE,
  12. PRIMARY KEY(USERID),
  13. )
  14. GO
  15.  
Can anyone see what's wrong with this Oracle CREATE TABLE statement which gives me the above error. I also have this error whenever I use the 'New Table' wizard.

Is it possible that the reason I'm getting this error is because I don't have permissions to add a table to the database I'm working with. I do know that I am prohibited from adding a tablespace.

Thanks for your help
Matt
Jun 2 '09 #1
5 4188
QVeen72
1,445 Expert 1GB
Hi,

You have an Extra Comma After the UserID.. Remove that..
Also note the Primary key constraint..
Check here

Regards
Veena
Jun 3 '09 #2
debasisdas
8,127 Expert 4TB
Why are you using all the double quotes and what is that GO in your code.
Jun 3 '09 #3
Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE TABLE "CADBOWNER"."LOGIN"
  2. (
  3. "USERID" VARCHAR2, 
  4. "FIRSTNAME" VARCHAR2, 
  5. "SURNAME" VARCHAR2, 
  6. "PHONENO" VARCHAR2, 
  7. "EMAIL" VARCHAR2, 
  8. "TRANSIT" VARCHAR2, 
  9. "ACCESSLEVEL" VARCHAR2, 
  10. "GRANTACCESS" VARCHAR2, 
  11. "CREATEDBY" VARCHAR2, 
  12. "DATEUPDATED" DATE
  13. )
  14.  
  15. GO 
OK, I tried using the info in that link to help but still no luck.

I get a 'missing or invalid option' error, both with and without brackets.
Can anyone help with this simple problem as I need it to create user security for my application!

The 'GO' has been taken from a previous SQL Server script and I believe is superfluous for Oracle.

Cheers
Matt
Jun 3 '09 #4
asp2
10
I think you should give Sizes for your VARCHAR2 columns ....
e.g. VARCHAR2(30)
Jun 3 '09 #5
debasisdas
8,127 Expert 4TB
Specify size of varchar2 field.
Jun 4 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: John | last post by:
Hi Right password -> ORA-12154: TNS:Could not resolve service name wrong password => ORA-01017: invalid username/password; logon denied Tested on a Windows XP client connecting to Oracle on...
1
by: Adam Ruth | last post by:
I'm using OCI on Mac OS X and I've run into a strange problem with my TNSNAMES.ORA file. My TNSNAMES.ORA file has one entry INV4II and it works fine. However, it will only work if that is the...
6
by: bdj | last post by:
Hello! I have at set of tnsnames.ora. I wich to make an union, e.g. a single file of it. How can I do that easy? Greetings Bjørn
1
by: Lisa Tang | last post by:
Hi, I have a table t1 with a long raw column, and I need to create a view v1 with a long raw column being a function ff1 of the long raw column in t1. And I need to update t1 with reverse...
12
by: GCM | last post by:
Hi, I have a table that has the following fields; LName, FName and MName. Also there are other fields in the table. I need to create another table with those fields combined as "Trim( & " " & &...
2
by: Dwie | last post by:
Dear All, I'm a new in Oracle DB. I'm using Windows 2000 as server and Windows XP as client. I installed Oracle Enterprise on server and Oracle 8.1 on clients. I have some client with 2 different...
0
by: truthbajaj | last post by:
Hi, I am using Oracle 9i and Unix on my system and trying to execute a UNIX shell command through external procedure in C. I created a shared lib (libextproc.so) for the following function. ...
5
by: Nitvar | last post by:
When i am trying to connect to oracle it is giving me these two errors ORA-12224: TNS:no listener ORA-01034: ORACLE not available I am new to oracle ,plz help I am using solaris 5.6 and...
3
by: Rahul B | last post by:
Hi, I have a user UCLDEV1 which is a part of staff and a group(db2schemagrp1) to which i have not given any permissions. The authorizations of that user are shown as db2 =get authorizations...
4
by: JonathanRead2000 | last post by:
Hi, One of our live london trading database instance ,crashed with the following message ..and there was a huge loss to the organization . ORA-7445 ] FROM CREATE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.