Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old January 12th, 2004, 09:26 PM
weebeng weebeng is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 76 weebeng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 22 sec
Reputation Power: 5
alter table

hi..i'm using the oracle db. I have some sql query problems here.
i'd like to drop the ACPC_DTTMISS column here. I've try the sql but failed. Can someone give me the solution?
Quote:
SQL> desc ac_paramcontrol;
Name Null? Type
------------------------- --------------- -----------
ACPC_PARAMID NOT NULL VARCHAR2(2)
ACPC_ISSNO NOT NULL NUMBER(5)
ACPC_DTTMISS DATE
ACPC_RECCOUNT NUMBER(5)
ACPC_LOCKBY NUMBER(5)
ACPC_DTTMSEND DATE
ACPC_SENDBY NUMBER(5)

SQL> alter table ac_paramcontrol drop column acpc_dttmiss;
alter table ac_paramcontrol drop column acpc_dttmiss
*
ERROR at line 1:
ORA-00406: COMPATIBLE parameter needs to be 8.1.0.0.0 or greater


And, I also would like to remove the primary key of ACPC_ISSNO. How to do that?
Thank you!

Reply With Quote
  #2  
Old January 12th, 2004, 10:21 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
Change the Compatible parameter in init.ora to 8.1.0x
and restart the database
...
__________________
El éxito consiste en una serie de pequeñas victorias día a día

MySQL, MS SQL, MS ACCESS, Oracle Database Manager - http://victorpendleton.net/products/psdviewer.html

Last edited by victorpendleton : January 13th, 2004 at 08:46 AM.

Reply With Quote
  #3  
Old January 13th, 2004, 08:42 AM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
Dropping of primary key is very simple, if you know the constraint name of primary key then use the follwoing example:

ALTER TABLE dept
DROP CONSTRAINT pk_dept CASCADE
/

If you are not sure about constraint name then use the follwoing example:

ALTER TABLE dept
DROP PRIMARY KEY CASCADE
/

If column dropping functionality is not available in your installed version of oracle then you can drop it by simple method:

For example i want to drop the location column of DEPT table:

CREATE TABLE dept2
AS SELECT deptno,dname from dept
/
now drop the DEPT table:

DROP TABLE dept
/

create table DEPT again:

CREATE TABLE dept
AS SELECT * from dept2
/

Reply With Quote
  #4  
Old January 29th, 2004, 04:36 AM
nimil nimil is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: india
Posts: 1 nimil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up Re: alter table

Quote:
Originally posted by weebeng
hi..i'm using the oracle db. I have some sql query problems here.
i'd like to drop the ACPC_DTTMISS column here. I've try the sql but failed. Can someone give me the solution?


And, I also would like to remove the primary key of ACPC_ISSNO. How to do that?
Thank you!


to drop a column from table use the command ' alter table [tablename] drop column [column_name']. this should work. all the best.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > alter table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway