Microsoft SQL Server uses:
T-SQL
PL/SQL
DDL
DML
The COUNT function is designed to tally the number of non-null "values" of an attribute and is often used in conjunction with the DISTINCT clause.
With the exception of the database creation process, most RDBMS vendors use SQL that deviates little from the ANSI standard SQL.
Which clause is specifically used with aggregate functions?
WHERE
DISTINCT
HAVING
ORDER BY
The underscore wildcard is used just like % but instead of matching multiple characters, the underscore matches just a single character.
Which SQL statement is used to return only different values?
SELECT UNIQUE
SELECT DIFFERENT
SELECT DISTINCT
All of the above
Which SQL keyword is used to sort the result-set?
SORT
SORT BY
ORDER
Which one of the following is NOT part of DDL?
SELECT INTO
CREATE
ALTER
TRUNCATE
CAST is unique to T-SQL.
Which one of the following JOIN includes all rows from the second table and matching rows from the first table?
Inner Join
Left Outer Join
Right Outer Join
Full Outer Join
What is the most common type of join?
Self Join
Which SQL statement is used to create a table in a database?
CREATE TABLE
CREATE DB
CREATE DATABASE TABLE
CREATE DATABASE TAB
Which SQL statements uses the keyword SET?
SELECT
UPDATE
MODIFY
DELETE
A table may be joined to itself.
The FULL OUTER JOIN syntax is not supported by Microsoft Access.
A set of SQL statements (one or more) typically grouped together to perform a specific routine is called ____________.
Views
Cursors
Stored Procedures
Indexes
According to the rules of precedence, which of the following computations should be completed first?
performing additions and subtractions
performing multiplications and divisions
performing operations within parentheses
performing power operations
The special operator used to check whether an attribute is within a range of values is ___________.
BETWEEN
LIKE
IN
NULL
To list the contents of a table, you must use the DISPLAY command.
The SQL data manipulation command HAVING:
restricts the selection of rows based on a conditional expression.
restricts the selection of grouped rows based on a condition.
modifies an attribute's value in one or more table's rows.
groups the selected rows based on one or more attributes.
You can call a stored procedure from within itself.
A temporary stored procedure with global scope has the following prefix:
#
##
!
EXECUTE_AS
Which one of the following is used to prevent SQL injection attacks?
Triggers
User-Defined Functions
-- Using a variable with CONCAT DECLARE @a VARCHAR(30) = 'My birthday is on ' DECLARE @b DATE = '1980/08/25' SELECT CONCAT (@a, @b) AS RESULT;
The above query will yield an error.
Which type of JOIN reflects is the following statement:
All rows from the left side of the join, even if there is not a match, and all rows from the right side, even if there is not a match, show up in the results.
INNER JOIN
LEFT OUTER JOIN
FULL OUTER JOIN
RIGHT OUTER JOIN
MERGE