I need to have duplicate values in my ms access table. There are two different table with composite key and primary key. Can you explain me the difference between Composite Keys and Primary and Secondary keys?
I need to have duplicate values in my ms access table. There are two different table with composite key and primary key. Can you explain me the difference between Composite Keys and Primary and Secondary keys?
In relational database design, a unique key or primary key is a candidate key to uniquely identify each row in a table. A unique key or primary key comprises a single column or set of columns. A composite key is a primary key that consists of more than one column. Oracle will create a composite primary key index on the table to implement and enforce the composite key.
To create composite key in table, select table design mode and select first key field and after that hold CTRL key and select second key field. After you select both the field, click on the key icon to add composite key in your table.
Composite key can declare or define as given in following example :
LINE_ITEMS table may have a composite key on {empid, empnumber}:
CREATE TABLE line_items (
empid NUMBER,
empnumber NUMBER,
branchId NUMBER,
age NUMBER,
PRIMARY KEY (empid, empnumbe));
Bookmarks