how to create a primary key with out creating an index?

Answers were Sorted based on User's Feedback



how to create a primary key with out creating an index?..

Answer / bhargavi

Primary key creates an Index implicitly.....so Its not
possible to create a Pk without am index....

Is This Answer Correct ?    16 Yes 0 No

how to create a primary key with out creating an index?..

Answer / vinoth

ALTER TABLE EMP ADD CONSTRAINT EMP_PK PRIMARY KEY(EMPNO)
DISABLE;

Primary key constraint is created and no index is created
since the constraint is disabled initially.

Is This Answer Correct ?    11 Yes 0 No

how to create a primary key with out creating an index?..

Answer / santanu

hi,
we can create pry key also by creating a sequence with NO
CYCLE option.
san

Is This Answer Correct ?    2 Yes 0 No

how to create a primary key with out creating an index?..

Answer / akshay

yes it possible using trigger
Create sequence S_Number
start with 1
increment by 1;


create trigger Pri_key before insert on table(C1)
for each row
Variable number(5);
begin
select sequence.nextvalue into Variable;
insert into table c1 value(variable);
end

Is This Answer Correct ?    3 Yes 2 No

how to create a primary key with out creating an index?..

Answer / anubha

The above trigger will give error of mutating table as in
this trigger you are doing dml operation on the triggering
table.

Is This Answer Correct ?    1 Yes 0 No

how to create a primary key with out creating an index?..

Answer / priyankur

Unique constraint will always create non-clustered index on
column. so creation of Unique constraint is not the
solution. Yes, only sequence can create unique column but
that is not necessarily Primary key unless you treat it
likewise.

Is This Answer Correct ?    0 Yes 0 No

how to create a primary key with out creating an index?..

Answer / highness

joseph please make it clear

Is This Answer Correct ?    1 Yes 2 No

how to create a primary key with out creating an index?..

Answer / benniyel gnanaraj

when u create a primary in the table the index is
implicitly create.index is not neccessary

Is This Answer Correct ?    0 Yes 1 No

how to create a primary key with out creating an index?..

Answer / joseph

useing the constraints

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More SQL PLSQL Interview Questions

trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output trans_id trans_date trans_amt debit_credit_indicator 001 JAN 1599 cr no.of trans 2 i want trans_id and trans_date like 'JAN' or 'FEB' etc, trans_amt i want all credit amount - debit amount per each trans_id. and debit_credit_indicator and no.of transactions in a month.

1 Answers   Oracle,


What is mutating error in pl sql?

0 Answers  


how to fetch common records from two tables? : Sql dba

0 Answers  


How many times can we commit in a loop?

0 Answers  


function can return multiple value?how give give sample coding

2 Answers   3i Infotech, CTS, Excelity Global, UHG,






What are the steps for performance tuning.

0 Answers  


What is sql server and ase?

0 Answers  


How to process query result in pl/sql?

0 Answers  


Give an example of any procedure.

5 Answers   Accenture, iFlex, Wipro,


What is database migration?

0 Answers  


How to run sql statements through the web interface?

0 Answers  


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

0 Answers  


Categories