What is the difference between the Primary and Foreign key?
Answer Posted / slokh
Primary key does not contain NULL or duplicate values.
whereas Foreign key accepts duplicate values but not null
values.
Primary key states the Entity integrity constraint, which
says that every row in a table is unique.
Foreign key states the referential integrity constraint,
that says that you can only insert values that is present
in the primary of the parent table.
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
what is data control language? : Sql dba
a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution
Can cursors be part of a trigger body?
what is uncommittable transactions? : Transact sql
How many joins can you have in sql?
what is data manipulation language? : Sql dba
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
What is natural join in sql?
How to use boolean type in select statement?
What does truncate mean in sql?
What is raid? How does it help storage of databases?
What is nvl?
How to install oracle sql developer?
Are dml statements autocommit?
Is ms sql is free?