what is foreign key? : Sql dba



what is foreign key? : Sql dba..

Answer / Awashesh Kumar Tiwari

A foreign key is a field or set of fields in one table that refers to the primary key of another table. It enforces referential integrity by ensuring that relationships between tables are maintained, and it improves data consistency by preventing invalid data from being inserted into the database.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is difference between pl and sql?

1 Answers  


Why query optimization is needed?

1 Answers  


Explain what is sql*plus?

1 Answers  


What is a join?Explain the different types of joins?

6 Answers   Bank Of India, CitiGroup, Google, ICICI, Saama Tech, SkyTech, TCS,


What is the use of cursor ? how cursor allocate context area for executing the sql statement?

4 Answers   HCL,


How many tables can you join in sql?

1 Answers  


Difference between NVL, NVL2 and NULLIF

1 Answers   CTS, Metric Stream,


What is sequence in sql?

1 Answers  


write the Sql query for creating database backup?

7 Answers   TCS,


Difference between DBMS and RDBMS...CODD's rules

4 Answers   Polaris,


IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT DUPLICATE VALUES? SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND PRIMARY KEY??????

8 Answers   rsystems,


What is the difference between join and union.

27 Answers   3i Infotech, ABC, Oracle, Polaris, TCS, XT Global,


Categories