adspace


what's the difference between a primary key and a unique key? : Sql server database administration

Answer Posted / Manoj Kumar Tiwari

A Primary Key is a column or group of columns in a table that uniquely identifies each row. It must contain unique, non-null values and cannot be changed once set. A Unique Key is similar to a Primary Key but can be composed of multiple columns and allows for null values (if all columns allow nulls). However, if the table has a Primary Key, it cannot have more than one Unique Key.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is standby servers? Explain types of standby servers.

1079


How to provide default values to function parameters?

1258


What are wait types?

1249


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2567


What is subquery? Explain the properties of a subquery?

1059


How to rebuild the master database?

1166


What are the source of constraints?

1009


If any stored procedure is encrypted, then can we see its definition in activity monitor?

1071


What are the different types of subquery?

1235


What is self contained sub query?

1140


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1133


What are the different subsets of sql?

1652


What is sql server query analyzer?

1128


do you know how to configure db2 side of the application? : Sql server database administration

1124


What are the kinds of subquery?

1107