What is Primary key and foreign key? Give an example
Answers were Sorted based on User's Feedback
Answer / vipin
Primary key which enforce the uniqueness in each row og table .
Foreign key win which the existing value in table must be there in other table .
diffrence is that PK does not allow Null Values anf FK allow null values
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / 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 |
Answer / aaaaaaaaaaaaa
Primary key is a primary key that is an attribute.
| Is This Answer Correct ? | 4 Yes | 4 No |
Answer / alquama rizvi
MS-Access requires a special way of recognising every record of a table. For this you have to set or make a primary key. If you do not do so, MS-Access does this itself by adding a new field , serving as the primary key. A table may have only one primary key, although it may have more than one fields.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to move database physical files in ms sql server?
Define cross join in sql server joins?
How do I start and stop sql server?
Define right outer join?
How to list all stored procedures in the current database using ms sql server?
what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
Tell me what do we need queues in sql service broker?
Tell me what do you understand by a view? What does the with check option clause for a view do?
One table Test with single column. These are the values in the table a b c d e f g h I need a query (without using any variable) with output as - a b c d e f g h
what is the information that can be stored inside a bit column? : Sql server database administration
How to name query output columns in ms sql server?
What is scrollable cursor?
Oracle (3259)
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)