If we declare constraints Unique and Not null on a single
column then it will act as a Primary key, so what is the use
of primary key??
Answer Posted / neha sinha
1) Primary key creates clustered index and unique key
creates non-clustered index. Performance wise clustered
index is fast so we need Primary key.
2)if we need more then one primary key in table than we can
use unique key+NOT NULL becous it behave as Primary key but
we cant define more than one column as primary key. :)
| Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
What is the clause we need to add in function body to return variable?
how many ways we can we find the current date using mysql? : Sql dba
what are the different functions in sorting an array? : Sql dba
How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?
What is trigger explain it?
Can we insert data into materialized view?
What is sql indexing?
What is coalesce sql?
What is cursor and why it is required?
what are enums used for in mysql? : Sql dba
What is a scalar value in sql?
C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September.
What does select top 1 do in sql?
What are inner outer left and right joins in sql?
How exception handling is done in advance pl/sql?