What is Primary key and foreign key? Give an example

Answer Posted / brajesh kumar srivastava

Primary key enforce uniqueness of column and deny to allow
null values to this column and enforce referential data
integrity constraint to other table column which is call
foreign key.
Foreign key column may contain null value

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you leave a union at any time?

766


Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

733


Can we insert data if clustered index is disabled?

679


What is transaction server consistency?

718


Why do we use non clustered index?

736






How to get the query of a table in sql server?

664


What is sql injection? How to protect against sql injection attack?

740


1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do

2254


Is sql server a database?

696


What is store procedure? How do they work? When do you use?

698


What does dml stand for?

685


How to use clusters?

695


How many categories of functions based their return modes?

848


What the difference between UNION and UNIONALL?

758


How to list all user defined functions in the current database?

694