Question: State whether True or False.
The plus (+) and minus (-) operators cannot be used to perform increment/decrement operations on datetime and smalldatetime values.
Question: Consider the following table structure of employees:
empid int(4)
deptname varchar(50)
salary int(4)
Which query will be used to display the Department (deptname) that is giving the maximum salary?
A
select deptname from employees where salary =max(salary)
B
select deptname from employees where salary =max(salary) group by deptname
C
select deptname from employees where salary = (select salary from employees group by salary)
D
select deptname from employees where salary =(select max(salary) from employees)
E
select deptname from employees where salary in (select salary from employees group by salary)
F
select deptname from employees where max(salary) in (select salary from employees group by salary)
Question: A table of employees has the following values for its salary field:
10000, 11000, 12000, 10000, 14000, 12000, 13000, 10000, 14000, 10000
What will the following query return?
Select distinct (salary) from employees