What is Primary key and foreign key? Give an example

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

1212


You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

482


what's sql server? : Sql server database administration

494


what changed between the previous version of sql server and the current version? : Sql server database administration

516


explain databases and sql server databases architecture? : Sql server database administration

515






Explain primary key and foreign key constraints?

522


What is service broker?

581


I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?

596


What are click through reports?

99


What were the latest updates to SQL Azure service?

92


How sql server enhances scalability of the database system?

585


Can you explain different types of locks in sql server?

522


What is the difference between ddl and dml?

566


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2011


Tell me what is difference between view and materialized view?

520