473,387 Members | 1,493 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,387 software developers and data experts.

ORA-01735 : invalid alter table option

126 64KB
I'm trying to execute this below query, which gives me an error ora-01735:invalid alter table option

Expand|Select|Wrap|Line Numbers
  1.  alter table main add 
  2. tranasction_id 
  3. numeric not null 
  4. auto_increment, add 
  5. primary key(transaction_id);
  6.  
please help
Jan 23 '13 #1
2 33117
Rabbit
12,516 Expert Mod 8TB
You need to separate your add column statement and your add constraint statement.

Also, I think it's supposed to be alter table tableName add column.
Jan 23 '13 #2
rski
700 Expert 512MB
Do it like that
Expand|Select|Wrap|Line Numbers
  1. alter table test add (
  2. transaction_id numeric not null  
  3. ,constraint transaction_id_pk primary key(transaction_id)
  4. )
  5.  
There is no auto_increment option in oracle. You should use sequences
Jan 24 '13 #3

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

Similar topics

5
by: Subrahmanyam Arya | last post by:
Dear oracle gurus, I am unable to get past the error ORA-12154: TNS: could not resolve service name on my host when using hsodbc to talk to a remote mysql database. i got from the meta link all...
1
by: Park Yeon Jo | last post by:
About Error : ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor I installed Oracle 8.1.7 on Windows XP Professional. and I wanto connect to that server...
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
2
by: Sheela | last post by:
I am trying to access the tables of a remote database(db2) from db1 database. I am getting the following error: ORA-12154: TNS:could not resolve service name I tried tnsping the db2 service_name...
0
by: DavidTurcotte | last post by:
Hi I have been working on this bugs for the last 2 days and i am out of gas. i have a ORA-12154: TNS:could not resolve service name error message when i try to acces an Oracle database The...
2
by: mpatel6 | last post by:
I had this error in alert log and my instance was down, anybody can help me? Errors in file /u01/app/oracle/admin/sotstest/bdump/sotstest_p004_626740.trc: ORA-07445: exception encountered: core...
0
by: kalpanaanand | last post by:
I am new to Oracle 9i client. i tried to log in but i am getting this error. this is my listenerfile # LISTENER.ORA Network Configuration File: C:\ProgramFiles\oracle\NETWORK\ADMIN\listener.ora #...
5
by: mivey4 | last post by:
Hi, First off, I am aware that this is a very heavily documented error and I have done my homework for throughly researching probable causes before deciding to post my problem here. At this point,...
1
by: michael ngong | last post by:
michael.john@gmx.at (Michael John) wrote in message news:<90cc4edd.0306230900.28075193@posting.google.com>... MIchael I you stated the OS and platform that could make it easier to address your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.