MS SQL Server Developer Interview
- Which of the following has the highest order of precedence?
- Functions and Parenthesis
- Multiplication, Division and Exponents
- Addition and Subtraction
- Logical Operations
- When designing a database table, how do you avoid missing column values for non-primary key columns?
- Use UNIQUE constraints
- Use PRIMARY KEY constraints
- Use DEFAULT and NOT NULL constraints
- Use FOREIGN KEY constraints
- Use SET constraints
- Which of the following is the syntax for creating an Index?
- CREATE [UNIQUE] INDEX index_name OF tbl_name (index_columns)
- CREATE [UNIQUE] INDEX OF tbl_name (index_columns)
- CREATE [UNIQUE] INDEX ON tbl_name (index_columns)
- CREATE [UNIQUE] INDEX index_name ON tbl_name (index_columns)
- Which of the following is not a valid character datatype in SQL Server?
- BLOB
- CHAR
- VARCHAR
- TEXT
- VARTEXT
- Which of the following statements about SQL Server comments is false?
- /* … */ are used for multiline comments
- // is used for single line comments
- – is used for single line comments
- Nested comments are allowed i.e. /* comment 1 /* comment 2 */ comment 1*/
- ‘ is used for single line comments
- Consider the following transaction code:
Begin Transaction
Update names_table set employee_name = "Ramesh" where employee_name = "Mahesh"
Save Transaction SAVE_POINT
Update salaries set salary=salary + 900 where employee_job = "Engineer"
Rollback transaction
Commit transaction
What will be the result produced by this transaction?- “Ramesh” will be updated to “Mahesh”, but salaries of engineers will not be
- Neither “Ramesh” will be updated to “Mahesh”, nor the salary of engineers will be updated.
- “Ramesh” will be updated to “Mahesh” and salary of engineers will also be
updated
updated.
- Which of the following constraints can be used to enforce the uniqueness of rows in a table?
- DEFAULT and NOT NULL constraints
- FOREIGN KEY constraints
- PRIMARY KEY and UNIQUE constraints
- IDENTITY columns
- CHECK constraints
- Which of the following are not date parts?
- quarter
- dayofweek
- dayofyear
- weekday
- The IF UPDATE (column_name) parameter in a trigger definition will return
TRUE in case of an INSERT statement being executed on the triggered table:- Yes
- No
- It returns TRUE only if an UPDATE query is executed
- Both b and c
- Which one of the following must be specified in every DELETE statement?
- Table Name
- Database name
- LIMIT clause
- WHERE clause
- Column Names























