Sqlserver Interview questions


Total available count: 45
Subject - Databases
Subsubject - Sqlserver

What is Foreign key?

1. A Foreign key in one table points to a Primary key in another table
2. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value
3. The foreign key constraints are used to enforce referential integrity
CREATE TABLE Company
(
    cid int NOT NULL,
    companyname varchar(255),
    empid int REFERENCES Employee(empid)
)

 




Next 5 interview question(s)

1
How can a programmer enforce to use particular Index?
2
Explain the joins in SQL Server?
3
What is Index Tuning in SQL Server?
4
What are the differences between UNION and JOINS in SQL Server?
5
Explain the difference between text and image data type?