answersLogoWhite

0

Yes. You can sort on any attribute or combination of attributes in a table (in SQL using the "order by" clause). Of course the sort is only as good as the "uniqueness" of the attribute you sort on, hence a combination of attributes may be helpful.

A primary key is, by definition, unique across all rows in the table.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the primary key for the properties table?

Primary key is to set property ID as the primary key for the properties table.


Can a primary key refer to a whole table?

No, a primary key do not refers to the whole table .A primary key refers to a field in the table that is not null and unique.


What is A field that uniquely identifies a particular record in a table called?

A field that uniquely identifies a particular record in a table is called a primary key. The field or fields on which records are sorted is called the sort key.


What is the difference between a Primary Key and a Secondary Key?

A Primary Key is a unique identifier for each record in a database table and is used to enforce entity integrity. A Secondary Key is a non-unique index that is used for querying and organizing data efficiently but does not have the constraint of uniqueness.


Why must the primary key of a parent table be determined before the foreign key in the child table?

Because the foreign key is copied from the primary key of the parent table


Is it necessarily that a foreign key is primary key in other table?

It is not mandatory that is must be a primary key but it must be a unique key in the other table.


What does the term foreign key mean in databases?

The foreign key is used as a reference in a table to the primary key of another table. For example: consider a table employee with id(primary key), name, address,department_id(foreign key) as its fields.Another table department with fields department_id(primary key) and dept_name. So, department_id is primary key in department table and foreign key in employee table.


Can a primary key be a foreign key?

Yes, a primary key can also be a foreign key. This is known as a composite key, where one or more columns in a table are both primary keys for that table and also act as foreign keys linking to another table.


How a primary key is fixed in a sql table?

A primary key field in a sql table is created using the PRIMARY KEY keyword. ex: CREATE TABLE tbl_employee ( emp_num VARCHAR(10), emp_name VARCHAR(100), PRIMARY KEY (emp_num)) The above script creates a table called tbl_employee and sets the emp_num field as the primary key


Can super key be as primary key?

I think super key is treated as the primary key because in a table their will be only one primary key.


What is primery key?

primary key is a column or set of columns (called composite primary key ) that identify the table & make every table unique .value of a primary key can not duplicated & can not be NULL .


How do you create a primay key in Oracle?

You can create a primary key column in an oracle table using the PRIMARY KEY keyword. Assuming you have an employee table that has employee information and has a column called emp_num. you can create a primary key in the table using the below command. ALTER TABLE tbl_employee_info add CONSTRAINT emp_pk PRIMARY KEY (emp_num) If you execute the above command in your database, emp_num will become the primary key of the table tbl_employee_info.