1. What will the output be if you try to perform arithmetic on NULL values?
- 0
- NULL
- It will generate an error message
- Can’t be determined
2. Which of the following options is not correct about the DATEDIFF() function?
- It returns the difference between parts of two specified dates
- It takes three arguments
- It returns a signed integer value equal to second date part minus first date part
- It returns a signed integer value equal to first date part minus second date part
3. 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?
- ALTER TABLE table1 ADD column2a varchar(50) AFTER column2;
- MODIFY TABLE table1 ADD column2a AFTER column2;
- INSERT INTO table1 column2a AS varchar(50) AFTER column2;
- ALTER TABLE table1 INSERT column2a varchar(50) AFTER column2;
- CHANGE TABLE table1 INSERT column2a BEFORE column3;
4. State which of the following are true
- Views are a logical way of looking at the logical data located in the tables
- Views are a logical way of looking at the physical data located in the tables
- Tables are physical constructs used for storage and manipulation of data in databases
- Tables are logical constructs used for storage and manipulation of data in databases
5. Which of the following is not a valid binary datatype in SQL Server?
- BINARY
- VARBINARY
- BIT
- IMAGE
- TESTAMP
6. Which of the following is false with regards to sp_help?
- When a procedure name is passed to sp_help, it shows the parameters
- When a table name is passed to sp_help, it shows the structure of the table
- When no parameter is passed, it provides a list of all objects and user-defined datatypes in a database
- All of the above are true
7. Which of the following is not a numeric group function?
- Avg
- Count
- Highest
- Max
- Stdev
- Sum
8. What clause should be used to display the rows of a table in ascending order of a particular column?
- Where
- Order By
- Group By
- Having
- First Group By and then Having
- Like
- Between
9. _________ is the operation that displays certain columns from the table.
- Restriction
- Intersection
- Join
- Union
- Projection
- Selection
- Extraction
- SubQuery
10. Consider the following tables: Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book ON a scale of 1 TO 10) Languagе (such AS French, English, German etc) Subjects --------- SubjectId Subject (such AS History, Geography, Mathematics etc) Authors -------- AuthorId AuthorName Country What is the query to determine which German books(if any) are more popular than all the French?
- select bookname from books where language='German' and popularityrating = (select popularityrating from books where language='French')
- select bookname from books where language='German' and popularityrating> (select popularityrating from books where language='French')
- select bookname from books where language='French' and popularityrating> (select max(popularityrating) from books where language='German')
- select bookname from books where language='German' and popularityrating> (select max(popularityrating) from books where language='French')