how to create a primary key with out creating an index?
Answer Posted / 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 |
Post New Answer View All Answers
How to raise user-defined exception with custom sqlerrm ?
What is the difference between database trigger and stored procedure?
Is and as keyword in pl sql?
what is heap table? : Sql dba
What is the starting oracle error number? What is meant by forward declaration in functions?
What are the different types of joins in sql?
how many triggers are allowed in mysql table? : Sql dba
What is rownum?
What are the rules to be applied to nulls whilst doing comparisons?
How to write html code in pl sql?
Do we need commit after truncate?
Why do we use subquery?
Is delete faster than truncate?
Is natural join and inner join same?
List different type of expressions with the example.