Technical Interview Questions and Answers :: SQL
The PRIMARY KEY is the column(s) used to uniquely identify each row of a table.
A FOREIGN KEY is one or more columns whose values are based on the PRIMARY or CANDITATE KEY values from the database.
A UNIQUE KEY is one or more columns that must be unique for each row of the table.
The UNIQUE KEY column restricts entry of duplicate values but entry of NULL value is allowed. In case of PRIMARY KEY columns entry of duplicate as well as
A View is a database object that is a logical representation of a table. It is derived from a table but has no storage space of its own and often may be used in the same manner as a table.
ROWID is the logical address of a row, and it is unique within the database.
INDEX is a general term for an SQL feature used primarily to speed up execution and impose UNIQUENESS upon data. You can use an index to gain fast access to specific information in a database table. An index is a structure that orders the values of one or more columns in a database table. The index provides pointers to the data values stored in specified columns of the table, and then orders those pointers according to the sort order you specify.
'Count': Counts the number of non-null values. 'Count (*)': Counts the number of rows in the table, including null values and duplicates.
Master, Model, msdb, Northwind, Pubs, tempdb.
No Discussion on this question yet!
Looking to grab a job as a Database Developer or Administrator? You can easily find SQL technical interview questions and answers on this page. All the questions have been previously asked during the technical rounds in IT companies. You can test your SQL database knowledge by solving these questions and compare your chances of fetching the job with a top IT company.
Are you targeting a specific IT company like Adobe? You can filter the question set by the company name easily. If you are not sure about a specific answer, you can easily click and read the answer along with the explanation. So, check these SQL technical interview questions and answers to prepare for your dream job.