I want to import these data to the sqldeveloper:
|Project Name||Street Name||Type||Postal||Market||Tenure||No. of||Price||Area||Type of||Floor Level||Unit Price||Date of Option|
|THE ROCHESTER||ROCHESTER DRIVE||Apartment||5||RCR||99 yrs lease commencing from 2005||1||1260000||861||Strata||06 to 10||1463||Sep-13|
|THE ROCHESTER||ROCHESTER DRIVE||Apartment||5||RCR||99 yrs lease commencing from 2005||1||1260000||861||Strata||11 to 20||1966||Sep-13|
|MERAPRIME||JALAN BUKIT HO SWEE||Condominium||3||RCR||99 yrs lease commencing from 2003||1||1900000||1313||Strata||26 to 30||1447||Sep-13|
|PEARL BANK APARTMENT||PEARL BANK||Apartment||3||RCR||99 yrs lease commencing from 1970||1||1520000||1755||Strata||16 to 20||866||Sep-13|
I used a trigger and sequence for auto-generate primary keys, but for the first 2, they have the same project name, different details.
I want them to have the same primary key, how do I go about it? :/
This isn't really a SQL Developer question. Try asking in the SQL and PL/SQL forum.
By definition, no two records can have the same primary key. That is what primary key means.
It first glance, looks like the natural key for these records would be a combination of project name and floor level .
What would happen if you wanted to increase the price at the Rochester on the upper floors but not the lower floors?