Database - Sql Server Database
MCQS
A. Table Structured Query Language
B. Transactional SQL
C. Transact-SQL
D. Table SQL
T-SQL stands for Transact-SQL in SQL Server.
A. DATETIME
B. DATE
C. TIMESTAMP
D. TIME
'DATETIME' is used to store a date and time combination in SQL Server.
A. Filter rows
B. Sort the result set
C. Limit the number of rows returned
D. Join multiple tables
The SELECT TOP clause is used to limit the number of rows returned in SQL Server.
A. DELETE FROM table;
B. REMOVE * FROM table;
C. TRUNCATE TABLE table;
D. DROP TABLE table;
'DELETE FROM table;' is used to delete records from a table in SQL Server.
A. Filter rows
B. Sort the result set
C. Combine rows into groups
D. Join multiple tables
The GROUP BY clause is used to combine rows into groups in SQL Server.
A. STRLEN()
B. LEN()
C. LENGTH()
D. STRINGLENGTH()
'LEN()' is used to find the length of a string in SQL Server.
A. Combines rows from two or more tables
B. Retrieves all rows from a table
C. Retrieves rows that have no matching rows in the other table
D. Excludes specified rows
INNER JOIN combines rows from two or more tables based on a related column.
A. ADD COLUMN
B. MODIFY COLUMN
C. INSERT COLUMN
D. CHANGE COLUMN
'ADD COLUMN' is used to add a new column to an existing table in SQL Server.
A. Filter rows based on a condition
B. Sort the result set
C. Combine rows into groups
D. Search for a specified pattern in a column
The LIKE operator is used to search for a specified pattern in a column in SQL Server.
A. CONCAT()
B. MERGE()
C. COMBINE()
D. STRING()
'CONCAT()' is used to concatenate strings in SQL Server.
A. Filter rows
B. Group rows
C. Sort the result set
D. Combine rows into groups
The ORDER BY clause is used to sort the result set in SQL Server.
A. Ensures unique values in a column
B. Limits the number of rows returned
C. Enforces a condition on a column
D. Sets a default value for a column
CHECK constraint enforces a condition on a column in SQL Server.
A. DELETE TABLE
B. REMOVE TABLE
C. DROP TABLE
D. DELETE FROM TABLE
'DROP TABLE' is used to remove a table from a database in SQL Server.
A. Save changes to the database
B. Undo changes made during the current transaction
C. Commit changes to the database
D. Delete records from the database
ROLLBACK is used to undo changes made during the current transaction in SQL Server.
A. UPDATE VALUES
B. MODIFY VALUES
C. SET VALUES
D. UPDATE SET
'UPDATE SET' is used to update values in a table based on a condition in SQL Server.
A. Establish a link between two tables
B. Automatically increments the value of a column
C. Enforce a unique constraint
D. Limit the number of rows returned
IDENTITY automatically increments the value of a column in SQL Server.
A. UNIQUE
B. ADD UNIQUE
C. CONSTRAINT UNIQUE
D. CREATE CONSTRAINT
'UNIQUE' is used to create a unique constraint on a column in SQL Server.
A. Atomicity, Consistency, Isolation, Durability
B. Association, Consistency, Isolation, Dependency
C. Atomicity, Consistency, Integration, Durability
D. Association, Commitment, Isolation, Dependency
"ACID" stands for Atomicity, Consistency, Isolation, Durability in transaction management in SQL Server.
A. Sort the result set
B. Filter rows
C. Eliminate duplicate values
D. Combine rows into groups
'DISTINCT' is used to eliminate duplicate values in the result set in SQL Server.
A. GRANT ALL PRIVILEGES
B. GRANT FULL ACCESS
C. GRANT SUPERUSER
D. GRANT ALL RIGHTS
'GRANT ALL PRIVILEGES' is used to grant all privileges to a user in SQL Server.
A. Filter rows
B. Sort the result set
C. Filter groups
D. Combine rows into groups
The HAVING clause is used to filter groups based on a condition in SQL Server.
A. CREATE TABLE
B. NEW TABLE
C. ADD TABLE
D. INSERT TABLE
'CREATE TABLE' is used to create a new table in a database in SQL Server.
A. Combines rows from two or more tables
B. Retrieves all rows from a table
C. Retrieves rows that have no matching rows in the other table
D. Generates the Cartesian product of two tables
CROSS JOIN generates the Cartesian product of two tables in SQL Server.
A. Find the average value
B. Find the total number of rows
C. Find the highest value
D. Find the lowest value
AVG() is used to find the average value of a numeric column in SQL Server.
A. MODIFY
B. CHANGE
C. UPDATE
D. SET
'UPDATE' is used to change the value of an existing record in a table in SQL Server.
A. Stores binary data
B. Stores integer values
C. Stores floating-point numbers
D. Stores a list of values
FLOAT is used to store floating-point numbers in SQL Server.
A. ALLOW PRIVILEGES
B. GRANT PRIVILEGES
C. GRANT
D. ALLOW ACCESS
'GRANT' is used to grant specific privileges to a user in SQL Server.
A. Filter rows
B. Sort the result set
C. Limit the number of rows returned
D. Join multiple tables
The LIMIT clause is used to limit the number of rows returned in SQL Server.
A. Stores XML data
B. Stores binary data
C. Stores integer values
D. Stores a list of values
The XML data type in SQL Server is used to store XML data.
A. INSERT INTO
B. ADD ROW
C. NEW ROW
D. CREATE ROW
'INSERT INTO' is used to add a new row to a table in SQL Server.
A. Combine multiple columns
B. Replace NULL values with a specified value
C. Calculate the average value
D. Concatenate multiple rows
'ISNULL()' is used to replace NULL values with a specified value in SQL Server.
A. Stores binary data
B. Stores integer values
C. Stores floating-point numbers
D. Stores a list of values
VARBINARY is used to store binary data in SQL Server.
A. REMOVE PRIVILEGES
B. DELETE PRIVILEGES
C. DROP PRIVILEGES
D. REVOKE
'REVOKE' is used to remove a user's privileges in SQL Server.
A. Find the average value
B. Find the length of a string
C. Find the position of a substring in a string
D. Concatenate multiple strings
'CHARINDEX()' is used to find the position of a substring in a string in SQL Server.
A. Generate a sequence of numbers
B. Execute a set of statements in response to an event
C. Establish a link between two tables
D. Enforce a unique constraint
A TRIGGER in SQL Server is used to execute a set of statements in response to an event.
A. Count the number of rows affected by a query
B. Suppress the count of the number of rows affected by a query
C. Count the total number of rows in a table
D. Disable the use of COUNT function
'SET NOCOUNT ON' is used to suppress the count of the number of rows affected by a query in SQL Server.
A. DIFFDATEDAYS()
B. DATEDIFF()
C. DIFFDATE()
D. DATE_DIFF()
'DATEDIFF()' is used to find the difference between two dates in SQL Server.
A. Extract a single value from an XML string
B. Combine multiple XML values
C. Concatenate XML strings
D. Validate XML structure
The value() method is used to extract a single value from an XML string in SQL Server.
A. MODIFY TABLE
B. CHANGE TABLE
C. ALTER TABLE
D. UPDATE TABLE
'ALTER TABLE' is used to change the structure of an existing table in SQL Server.
A. Execute a set of statements in a loop
B. Handle exceptions and errors in a controlled manner
C. Define a cursor for record processing
D. Create a temporary table
The TRY...CATCH block is used to handle exceptions and errors in a controlled manner in SQL Server.
A. Filter rows based on a condition
B. Sort the result set
C. Combine rows into groups
D. Perform conditional logic in a query
The CASE statement is used to perform conditional logic in a query in SQL Server.
A. ADD INDEX
B. CREATE INDEX
C. INDEX TABLE
D. ALTER INDEX
'CREATE INDEX' is used to create an index on a table in SQL Server.
A. Combine rows from two or more tables
B. Rotate rows into columns based on values in a specified column
C. Sort the result set
D. Join multiple tables
The PIVOT operator is used to rotate rows into columns based on values in a specified column in SQL Server.
A. DELETE INDEX
B. REMOVE INDEX
C. DROP INDEX
D. ERASE INDEX
'DROP INDEX' is used to remove an index from a table in SQL Server.
A. Combine rows from two or more tables
B. Rotate columns into rows based on values in a specified column
C. Sort the result set
D. Join multiple tables
The UNPIVOT operator is used to rotate columns into rows based on values in a specified column in SQL Server.
A. Suppress errors in a query
B. Display a custom error message
C. Count the number of errors in a query
D. Create a temporary error table
The RAISEERROR statement is used to display a custom error message in SQL Server.
A. Combine rows from two or more tables
B. Update, insert, or delete data based on a condition
C. Sort the result set
D. Join multiple tables
The MERGE statement is used to update, insert, or delete data based on a condition in SQL Server.
A. GRANT EXECUTE
B. GRANT EXECUTION
C. ALLOW EXECUTE
D. ALLOW EXECUTION
'GRANT EXECUTE' is used to grant execute permissions on a stored procedure in SQL Server.
A. Index an entire XML column
B. Index specific elements or attributes in an XML column
C. Exclude XML columns from indexing
D. Disable indexing for XML columns
The XML INDEX option is used to index specific elements or attributes in an XML column in SQL Server.
A. Concatenate multiple values
B. Convert a value to a different data type and handle errors gracefully
C. Find the average value
D. Validate XML structure
'TRY_CONVERT()' is used to convert a value to a different data type and handle errors gracefully in SQL Server.
A. DELETE TABLE
B. REMOVE TABLE
C. TRUNCATE TABLE
D. DROP TABLE
'TRUNCATE TABLE' is used to remove all records from a table and reset identity seed in SQL Server.
A. Generate a sequence of numbers
B. Execute a set of statements in a loop
C. Define a cursor for record processing
D. Create a temporary table
The SEQUENCE object is used to generate a sequence of numbers in SQL Server.
A. Combine rows from two or more tables
B. Rotate rows into columns based on values in a specified column
C. Execute a table-valued function for each row
D. Sort the result set
The CROSS APPLY operator is used to execute a table-valued function for each row in SQL Server.
A. RENAME TABLE
B. ALTER TABLE RENAME
C. ALTER TABLE RENAME TO
D. ALTER TABLE RENAME AS
'ALTER TABLE RENAME TO' is used to rename a table in SQL Server.
A. Perform full-text search
B. Concatenate multiple columns
C. Validate XML structure
D. Generate a sequence of numbers
'CONTAINSTABLE' is used to perform a full-text search in SQL Server.
A. Find the length of a string
B. Find the current user
C. Calculate the average value
D. Concatenate multiple rows
'SYSTEM_USER' is used to find the current user in SQL Server.
A. Concatenate multiple columns
B. Parse a string into a specified data type
C. Calculate the average value
D. Generate a sequence of numbers
The PARSE() function is used to parse a string into a specified data type in SQL Server.
A. CREATE PROCEDURE
B. NEW PROCEDURE
C. ADD PROCEDURE
D. INSERT PROCEDURE
'CREATE PROCEDURE' is used to create a stored procedure in SQL Server.
A. Mathematical constant representing the ratio of a circle's circumference to its diameter
B. Numeric constant representing the speed of light
C. Constant representing the number of days in a year
D. Constant representing the number of seconds in a minute
The PI constant represents the mathematical constant π in SQL Server.
A. Concatenate multiple strings
B. Quote an identifier to make it a valid SQL Server delimited identifier
C. Calculate the average value
D. Round numeric values
'QUOTENAME()' is used to quote an identifier to make it a valid SQL Server delimited identifier.