This is a discussion on SQL Server FAQ within the SQL Server forums, part of the Database category; 1) Which of the following has the highest order of precedence? 2) When designing a database table, how do you ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
SQL Server FAQ
1) Which of the following has the highest order of precedence?
2) When designing a database table, how do you avoid missing column values for non-primary key columns? 3) Which of the following is not a valid character datatype in SQL Server? 4) 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? 4) Which of the following constraints can be used to enforce the uniqueness of rows in a table? 5) Which of the following are not date parts? 6) 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: 7) Which one of the following must be specified in every DELETE statement? 8) Which one of the following correctly selects rows from the table myTable that have null in column column1? 9) Is this statement true or false: A cursor is a pointer that identifies a specific working row within a set 10) Which of the following commands is used to change the structure of table? a. CHANGE TABLE b. MODIFY TABLE c. ALTER TABLE d. UPDATE TABLE 11) Consider the following statements and pick the correct answer: 1. ceiling() - returns the smallest integer greater than or equal to the specified value 2. floor() - returns the largest integer less than or equal to the specified value 12) What is the correct SQL syntax for returning all the columns from a table named "Persons" sorted REVERSE alphabetically by "FirstName"? 13) What is the maximum value that can be stored for a datetime field? 14) Consider the following queries: 1. select * from employee where department LIKE "[^F-M]%"; 2. select * from employee where department = "[^F-M]%"; Select the correct option: a. Query 2 will return an error b. Both the queries will return the same set of records c. Query 2 is perfectly correct d. Query 2 would return one record less than Query 1 15) How can you view the structure of a table named "myTable" in SQL Server? 16) What does referential integrity (also called relational integrity) prevent? 17) Which of the following is not a global variable? 18) Consider the following two tables: 1. customers( customer_id, customer_name) 2. branch ( branch_id, branch_name ) What will be the output if the following query is executed: Select * branch_name from customers,branch a. It will return the fields customer_id, customer_name, branch_name b. It will return the fields customer_id, customer_name, branch_id, branch_name c. It will return the fields customer_id, customer_name, branch_id, branch_name, branch_name d. It will return an empty set since the two tables do not have any common field name e. It will return an error since * is used alone for one table only 19) Which of the following is not a control statement? 20) Which of the following is not a valid Numeric datatypes in SQL Server? 21) Which of the following datatypes is not supported by SQL-Server? 22)What will the output be if you try to perform arithmetic on NULL values? 23) Which of the following options is not correct about the DATEDIFF() function? 24) Sample Code CREATE TABLE table1( column1 varchar(50), column2 varchar(50), column3 varchar(50), column4 varchar(50)); Which one of the following is the correct syntax for adding the column named "column2a" after column2 to the table shown above? 24) State which of the following are true a. Views are a logical way of looking at the logical data located in the tables b. Views are a logical way of looking at the physical data located in the tables c. Tables are physical constructs used for storage and manipulation of data in databases d. Tables are logical constructs used for storage and manipulation of data in databases 25) Which of the following is not a valid binary datatype in SQL Server? 26) Which of the following is false with regards to sp_help? 27 ) Which of the following are false for batches (batch commands)? |
|
|||
|
1) Looks like all nulls
![]() 2) use the "NOT NULL" suffix clause for the column name 3) Again all nulls... 4) All engineers get a pay hike of 900, nothing else. 5) All nulls again... 6) No situation specified... Nothing to answer. 7) probably the table name or the "from" keyword Ok, now I'm feeling too lazy... I'll answer the rest later ![]() |