[program-l] Re: Oracle sql question

  • From: Richard Bartholomew <richard_bartholomew@xxxxxxxxxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Sat, 31 Oct 2009 08:08:24 +0000

Hi,

On the face of it, this just looks like a unique index and, therefore,

DROP INDEX MKGCONN_PK;

should suffice.

However, if this index was associated with a primary key, try

ALTER TABLE MAKING_CONNECTIONS DROP CONSTRAINT MKGCONN_PK INCLUDING 
INDEXES;

This may vary depending on which version of Oracle you're using.


Richard Bartholomew
Senior Technician
ISOS Enterprise Middleware
Standard Life Employee Services Limited
http://www.standardlife.com

Tel:    +44 (0)131 245 1667




"Lafond, Eileen" <Eileen.Lafond@xxxxxxxxxxx> 
Sent by: program-l-bounce@xxxxxxxxxxxxx
30/10/2009 21:29
Please respond to
program-l@xxxxxxxxxxxxx


To
"program-l@xxxxxxxxxxxxx" <program-l@xxxxxxxxxxxxx>
cc

Subject
[program-l] Re: Oracle sql question






Hi,
I had created a primary key in a table named Making_Connections with the 
fields of first_name, last_name, and date_article.  the code follows:
 
 
CREATE UNIQUE INDEX MKGCONN_PK ON MAKING_CONNECTIONS
(first_name, last_name, date_article);
 
Now, I need to change the fields from the above to a field named 
mkgconn_key.
 
I have disabled the constraint.  But I cannot seem to find the correct 
syntax to either drop the primary key and create again or to alter it and 
make the change. 
 
Any suggestions?
 
 
Eileen La Fond
Phone (206) 386-0011
e.mail Eileen.LaFond@xxxxxxxxxxx
 
From: program-l-bounce@xxxxxxxxxxxxx 
[mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Richard Bartholomew
Sent: Friday, October 30, 2009 4:34 AM
To: program-l@xxxxxxxxxxxxx; Lafond, Eileen
Subject: [program-l] Re: Oracle sql question
 

Hi, Justin 

The following is taken from the Oracle documentation and uses standard 
notation to show optional and mandatory parameters, ie | [], etc - well, 
standard notation for Oracle, anyway!  Let me know if you need more. 

CREATE SEQUENCE [ schema. ]sequence 
   [ { INCREMENT BY | START WITH } integer 
   | { MAXVALUE integer | NOMAXVALUE } 
   | { MINVALUE integer | NOMINVALUE } 
   | { CYCLE | NOCYCLE } 
   | { CACHE integer | NOCACHE } 
   | { ORDER | NOORDER } 
   ]; 
    

Richard Bartholomew
Senior Technician
ISOS Enterprise Middleware
Standard Life Employee Services Limited
http://www.standardlife.com

Tel:        +44 (0)131 245 1667



"Justin Daubenmire" <justind@xxxxxxxxx> 
Sent by: program-l-bounce@xxxxxxxxxxxxx 
30/10/2009 11:09 


Please respond to
program-l@xxxxxxxxxxxxx



To
<program-l@xxxxxxxxxxxxx> 
cc

Subject
[program-l] Re: Oracle sql question
 








Hi Richard, 
  
Can you please post us the syntax to create a sequence? 
  
Thanks! 
  
/Justin 
 
----- Original Message ----- 
From: Richard Bartholomew 
To: program-l@xxxxxxxxxxxxx 
Sent: Friday, October 30, 2009 4:23 AM 
Subject: [program-l] Re: Oracle sql question 


Hi, 

Although there is no field called TEXT in the view, all the relevant 
information is there, eg the minimum and maximum values of the sequence, 
whether it should cycle when max is reached, the increment amount  and the 
latest number being used.  Therefore, you just need to fit the values into 
the CREATE SEQUENCE syntax - I'm sure that's all that TOAD did. 


Richard Bartholomew
Senior Technician
ISOS Enterprise Middleware
Standard Life Employee Services Limited
http://www.standardlife.com

Tel:        +44 (0)131 245 1667


"Lafond, Eileen" <Eileen.Lafond@xxxxxxxxxxx> 
Sent by: program-l-bounce@xxxxxxxxxxxxx 
29/10/2009 19:38 


Please respond to
program-l@xxxxxxxxxxxxx

 


To
"program-l@xxxxxxxxxxxxx" <program-l@xxxxxxxxxxxxx> 
cc

Subject
[program-l] Oracle sql question
 









Hi, 
I need to get the code that was used to develop a sequence.  The name of 
the sequence is budgets_seq. 
 
In the user_sequences table there is no field called text.  In the other 
user tables I get the code by doing a select of the text field based on 
the name of the item. 
 
since there is no text field, can anyone tell me how to get the code for 
this particular sequence? 
 
We no longer have Toad so that is not an option. 
 
Thanks for any help, 
 
Eileen La Fond 
phone number: (206) 386-0011 
email: eileenlafond@xxxxxxxxxxx 


This e-mail is confidential and, if you are not the intended recipient, 
please return it to us and do not retain or disclose it. We filter and 
monitor e-mails in order to protect our system and the integrity, 
confidentiality and availability of e-mails. We cannot guarantee that 
e-mails are risk free and are not responsible for any related damage or 
unauthorised alteration of e-mails by third parties after sending.

For more information on Standard Life group, visit our website 
http://www.standardlife.com/

Standard Life plc (SC286832), Standard Life Assurance Limited* (SC286833) 
and Standard Life Employee Services Limited (SC271355) are all registered 
in Scotland at Standard Life House, 30 Lothian Road, Edinburgh EH1 2DH. 
*Authorised and regulated by the Financial Services Authority. 0131 225 
2552. Calls may be recorded/monitored. Standard Life group includes 
Standard Life plc and its subsidiaries.

Please consider the environment. Think - before you print. 


This e-mail is confidential and, if you are not the intended recipient, 
please return it to us and do not retain or disclose it. We filter and 
monitor e-mails in order to protect our system and the integrity, 
confidentiality and availability of e-mails. We cannot guarantee that 
e-mails are risk free and are not responsible for any related damage or 
unauthorised alteration of e-mails by third parties after sending.

For more information on Standard Life group, visit our website 
http://www.standardlife.com/

Standard Life plc (SC286832), Standard Life Assurance Limited* (SC286833) 
and Standard Life Employee Services Limited (SC271355) are all registered 
in Scotland at Standard Life House, 30 Lothian Road, Edinburgh EH1 2DH. 
*Authorised and regulated by the Financial Services Authority. 0131 225 
2552. Calls may be recorded/monitored. Standard Life group includes 
Standard Life plc and its subsidiaries.

Please consider the environment. Think - before you print.


This e-mail is confidential and, if you are not the intended recipient, 
please return it to us and do not retain or disclose it. We filter and 
monitor e-mails in order to protect our system and the integrity, 
confidentiality and availability of e-mails. We cannot guarantee that 
e-mails are risk free and are not responsible for any related damage or 
unauthorised alteration of e-mails by third parties after sending.

For more information on Standard Life group, visit our website 
http://www.standardlife.com/

Standard Life plc (SC286832), Standard Life Assurance Limited* (SC286833) 
and Standard Life Employee Services Limited (SC271355) are all registered 
in Scotland at Standard Life House, 30 Lothian Road, Edinburgh EH1 2DH. 
*Authorised and regulated by the Financial Services Authority. 0131 225 
2552. Calls may be recorded/monitored. Standard Life group includes 
Standard Life plc and its subsidiaries.

Please consider the environment. Think - before you print.

Other related posts: