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


Please Help Members By Posting Answers For Below Questions

How is use pl and sql?

727


what is the syntax for using sql_variant_property? : Transact sql

698


What is left join in postgresql?

739


What is a variable in sql?

714


What is sql injection vulnerability?

663






Can variables be used in sql statements?

739


What is a column in a table?

760


What is the difference between microsoft access and sql?

715


What are the types pl/sql code blocks?

788


How to call shell script from pl sql procedure?

837


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1892


What are types of indexes in sql?

741


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

858


Is left join faster than join?

755


Write a query to display the current date in sql?

732