MS SQL Server 2000 Test
___________ is the highest level of a transaction isolation implemented by SQL Server.
A company has the following departments: marketing, Designing, production, Packing What will be the result of the following query? select * from table where department < 'marketing';
A production house needs a sale report where total sale of the day is more than $20,000. Which of the following query should be used?
A table has following values for its department field: marketing, production, production, sales, NULL, NULL, Marketing, Null What will the following query return: Select distinct(department) fro...
Choose the appropriate query for the Products table where data should be displayed primarily in ascending order of the ProductGroup column. Secondary sorting should be in descending order of the Cu...
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:
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 les...
Consider the following table structure of students: rollno int name varchar(20) course varchar(20) What will be the query to display the courses in w...
Consider the following tables: Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book on a scale of 1 to 10) Language (such as French, Eng...
Consider the following transaction code: Begin Transaction Update names_table set employee_name = "Ramesh" where employee_name = "Mahesh" Save Transaction SAVE_POINT ...
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 *, bran...
Consider the query: SELECT name FROM Student WHERE name LIKE '_a%'; Which names will be displayed?
Consider the transaction: Begin Transaction Create table A ( x smallint , y smallint ) Create table B ( p smallint , q smallint ) Update A...
Does SQL Server support user-defined datatypes?
Evaluate the following SQL statement: SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_...
Examine the code given below: SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 Which of the following statements is correct with regard to this code?
Examine the data in the EMPLOYEES table given below: LAST_NAME DEPARTMENT_ID SALARY ALLEN 10 3000 MILLER 20 1500 King ...
Examine the description of the STUDENTS table: STD_ID INT COURSE_ID VARCHAR (10) START_DATE DATETIME END_DATE DATETIME The aggregate functions valid on the ST...
Examine the query:- select (2/2/4) from tab1; where tab1 is a table with one row. This would give a result of:
Examine the two SQL statements given below: SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC What is tru...
How can you change "Hansen" into "Nilsen" in the LastName column in the Persons Table?
How can you view the structure of a table named "myTable" in SQL Server?
In a query, which of the following is/are executed first?
In which sequence are queries and sub-queries executed by the SQL Engine?
Is it possible to insert several rows into a table with a single INSERT statement?
Is the following statement true or false? A column that allows NULLs requires more space to store a value.
Is the FROM clause necessary in every SELECT statement?
Is this statement true or false: A cursor is a pointer that identifies a specific working row within a set
It is time for the annual sales awards at your company. The awards include certificates awarded for the five sales of the highest sale amounts. You need to produce a list of the five highest revenu...
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 ...
State which of the following are true
Study the situation described below and identify the nature of relationship? Each student can enroll into more than one class. Each class can accommodate more than one student.
The AND operator displays a row if ANY conditions listed are true. The OR operator displays a row if ALL of the conditions listed are true
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:
The names of those departments where there are more than 100 employees have to be displayed. Given two relations, employees and departments, what query should be used? Employee --------- Empno Empl...
The sales database contains a customer table and an order table. For each order there is one and only one customer, and for each customer there can be zero or more orders. How should primary and ...
The simplest query must include at least ________ and _________.
The STUDENT_GRADES table has these columns: STUDENT_ID INT SEMESTER_END DATETIME GPA FLOAT Which of the following statements finds the highest Grade Point Average (G...
View the following Create statement: 1 Create table Pers 2(EmpNo Int not null, 3 EName Char not null, 4 Join Datetime not null, 5 Pay Smallmoney) Which line contains an error?
What does BLOB stand for?
What does referential integrity (also called relational integrity) prevent?
What happens if you type the following statement at the T-SQL prompt? SELECT getdate()
What is the correct order of clauses in the select statement? 1 select 2 order by 3 where 4 having 5 group by
What is the correct SQL syntax for returning all the columns from a table named "Persons" sorted REVERSE alphabetically by "FirstName"?
What is the correct SQL syntax for selecting all the columns where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
What is the maximum value that can be stored for a datetime field?
What is the numeric range that is supported by the datatype tinyint?
What is the order of precedence among the following operators? 1 IN 2 NOT 3 AND 4 OR
What is wrong with the following query: select * from Orders where OrderID = (select OrderID from OrderItems where ItemQty > 50)
What will happen if you query the emp table as shown below: select empno, DISTINCT ename, Salary from emp;
When designing a database table, how do you avoid missing column values for non-primary key columns?
Which of the following are aggregate functions in SQL?
Which of the following are false for batches (batch commands)?
Which of the following are not date parts?
Which of the following commands is used to change the structure of table?
Which of the following constraints can be used to enforce the uniqueness of rows in a table?
Which of the following datatypes is not supported by SQL-Server?
Which of the following is an invalid statement for manipulation of binary data?
Which of the following is false with regards to sp_help?
Which of the following is not a column property?
Which of the following is not a control statement?
Which of the following is not a global variable?
Which of the following is not a SQL operator?
Which of the following is not a valid Arithmetic operator in SQL Server?
Which of the following is not a valid binary datatype in SQL Server?
Which of the following is not a valid character datatype in SQL Server?
Which of the following is the syntax for creating an Index?
Which of the following is/are true with reference to Triggers?
Which of the following options is correct about identity(seed, increment)?
Which of the following options is not correct about the DATEDIFF() function?
Which of the following queries is valid?
Which of the following statements about SQL Server comments is false?
Which of the following statements are false?
Which of the following statements are true?
Which of the following statements is not true about the table object in SQL Server?
Which one of the following correctly selects rows from the table myTable that have null in column column1?
Which one of the following fields is the ideal candidate for the primary key in a student record base?
Which one of the following must be specified in every DELETE statement?
Which operator will be evaluated first in the following statement: select (age + 3 * 4 / 2 - 8) from emp
Which query will display data from the Pers table relating to Analysts, Clerks and Salesmen who joined between 1/1/2005 and 1/2/2005?
You are maintaing data for its products in the Products table, and wants to see the products which are 50 or more numbers far from the minimum stock limit. The structure of the Products table is: ...
You should avoid the use of cursors because:
You want to display the titles of books that meet the following criteria: 1. Purchased before November 11, 2002 2. Price is less than $500 or greater than $900 You want to sort the result by the ...