What is foreign key and example?
Answer / Rajendra Kumar Nepane
A foreign key is a field in one table that refers to the primary key of another table. It helps establish relationships between tables in a database, ensuring data integrity by enforcing referential constraints. For example, in a 'Orders' table, an order_id (foreign key) could link to a 'Customers' table with customer_id (primary key).
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between CHAR and VARCHAR2? If VARCHAR2 serves the uses of CHAR why CHAR is still used and not been discarded yet?
Which are sql * plus commands?
How many triggers can be applied on a table?
What is set transaction?
How do you display "13th of November, 17 days left for month end" without hardcoding the date.
What is a composite primary key?
What is difference between select statement and cursor
Why commit is not used in triggers?
What is latest version of sql?
Do triggers have restrictions on the usage of large datatypes, such as long and long raw?
What data types does pl/SQL have?
Write a sql select query that only returns each name only once from a table?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)