Understanding Questions For SQL Server & SQL Server Management Studio Part II
A primary key is a field in a table which uniquely identifies each row/record in a database table.
Primary keys must contain unique values.
Identity column of a table is a column whose value increases automatically.
The value in an identity column is created by the server.
A user generally cannot insert a value into an identity column.
Identity column can be used to uniquely identify the rows in the table.
In a one-to-many relationship, one record in a table can be associated with one or more records in another table.
In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the column or columns in another table.
This column becomes a foreign key in the second table.
Yes, it can be NULL.
A Foreign key simply requires that the value in that field must exist first in a different table.
Null by definition is not a value.
Composite key is a key which is the combination of more than one field or column of a given table.
The WHERE clause is used to filter records.
It is used to extract only those records that fulfill a specified condition.
The column names that follow the select keyword determine which columns will be returned in the results.
SQL aliases are used to give a temporary name.
An alias is created with the AS keyword.
INNER JOIN : Returns records that have matching values in both tables.
LEFT JOIN : Returns all records from the left table, and the matched records from the right table.
RIGHT JOIN : Returns all records from the right table, and the matched records from the left table.
Comments
Post a Comment