- 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 updated
- 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.
- 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
- Which one of the following correctly selects rows from the table myTable that have null in column column1?
- SELECT * FROM myTable WHERE column1 is null
- SELECT * FROM myTable WHERE column1 = null
- SELECT * FROM myTable WHERE column1 EQUALS null
- SELECT * FROM myTable WHERE column1 NOT null
- SELECT * FROM myTable WHERE column1 CONTAINS null
- Is this statement true or false: A cursor is a pointer that identifies a specific working row within a set
- True
- False
- Which of the following commands is used to change the structure of table?
- CHANGE TABLE
- MODIFY TABLE
- ALTER TABLE
- UPDATE TABLE
Thursday, 19 June 2008
Database developer interview questions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment