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 is use pl and sql?
what is the syntax for using sql_variant_property? : Transact sql
What is left join in postgresql?
What is a variable in sql?
What is sql injection vulnerability?
Can variables be used in sql statements?
What is a column in a table?
What is the difference between microsoft access and sql?
What are the types pl/sql code blocks?
How to call shell script from pl sql procedure?
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
What are types of indexes in sql?
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?
Is left join faster than join?
Write a query to display the current date in sql?