T-SQL And General SQL: Unit 1 - Introduction To SQL Queries

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Ifeanyiisitor
I
Ifeanyiisitor
Community Contributor
Quizzes Created: 1 | Total Attempts: 244
| Attempts: 244 | Questions: 17
Please wait...
Question 1 / 17
0 %
0/100
Score 0/100
1. SQL: What operator would you use to find values that are not in a specified list?

Explanation

The NOT IN operator is used to find values that are not present in a specified list. It is commonly used in SQL queries to filter out records that do not match the values provided in the list. By using the NOT IN operator, you can easily exclude specific values from the result set based on your criteria.

Submit
Please wait...
About This Quiz
SQL Quizzes & Trivia

This introductory quiz on T-SQL and SQL queries tests knowledge of data insertion, date formats, and query execution in SQL Server Management Studio. It assesses understanding of case sensitivity in queries and the use of SQL operators, enhancing foundational SQL skills.

Personalize your quiz and earn a certificate with your name on it!
2. SQL: what operator is used to perform a search that matches a range of values?

Explanation

The operator used to perform a search that matches a range of values in SQL is "BETWEEN". It is case-insensitive, so it can be written as "between" or "Between" as well. This operator is commonly used in SQL queries to specify a range of values for a particular condition, such as selecting records with values between a certain minimum and maximum value.

Submit
3. T-SQL: What keyboard shortcut do you use in sql server management studio to execute an sql statement?

Explanation

Pressing the F5 key in SQL Server Management Studio allows the user to execute an SQL statement. This shortcut is commonly used to quickly run queries and commands without the need to manually click on the execute button.

Submit
4. SQL: What operator is used to compare against null values?

Explanation

The operator "IS NULL" is used to compare against null values in SQL. It can be written in lowercase or uppercase letters, as "is null" or "Is Null". This operator is used to check if a value is null or not, as null values cannot be compared using the regular comparison operators such as "=", ">", "

Submit
5. SQL: What operator(s) is used to compare against values that are not null?

Explanation

The operator "IS NOT NULL" is used in SQL to compare against values that are not null. This operator is case-insensitive, so it can be written as "is not null" or "Is Not Null" as well. It is used in conditional statements to filter out rows where a particular column does not have a null value.

Submit
6. SQL: What operator would you use to compare against values that are not like other values?

Explanation

The NOT LIKE operator is used in SQL to compare values that are not similar to other values. It allows for the comparison of strings based on patterns, where the specified pattern does not match the values being compared. This operator is useful when you want to retrieve records that do not have a specific pattern or do not match a certain string.

Submit
7. T-SQL: A column name can be specified without using the 'AS' keyword as folows:   SELECT sal*1.10 new_sal FROM dbo.emp

Explanation

Either

SELECT sal*1.10 new_sal
FROM dbo.emp

or

SELECT sal * 1.10 AS new_sal
FROM dbo.emp

is valid.

Submit
8.   SQL: What operator would you use to compare against values that are not null?

Explanation

The IS NOT NULL operator is used in SQL to compare values that are not null. It returns true if the value is not null and false if the value is null. This operator is commonly used in WHERE clauses to filter out null values from the result set.

Submit
9. SQL: What is the 'not equals' operator?

Explanation

The 'not equals' operator in SQL is represented by the symbol ''. It is used to compare two values and returns true if the values are not equal, and false if they are equal. It is commonly used in SQL queries to filter out specific values that do not match a certain condition.

Submit
10. SQL: What operator is used for negation?

Explanation

The operator used for negation in SQL is "NOT". It can be written in lowercase as "not" or in title case as "Not". Another symbol that can be used for negation is the exclamation mark "!".

Submit
11. SQL: What operator do you use to perform wildcard matches?  

Explanation

An example is as follows:

SELECT ename, job, deptno
FROM dbo.emp
WHERE ename LIKE 'M%'

Submit
12. T-SQL: You have a table with a colum entitled 'job', whose values are all lower case. If you execute the following query:   SELECT ename, job, deptno FROM dbo.emp WHERE job = 'CLERK'   you will not get any results back buecase the match is case sensitve and so because all values of the 'job' colum are lowercase, uppercase 'CLERK' will not be found.

Explanation

With SQL Server, the match is not case sensitve

Submit
13. T-SQL: What is the format for the 'date' datatype?

Explanation

SEE: http://msdn.microsoft.com/en-us/library/bb630352.aspx

Not that date values must be passed in as string (e.g., '1981-06-09')

Submit
14. SQL: What operator(s) can be used to perform a search that is not in a specified range of values?

Explanation

The correct answer is "NOT BETWEEN". This operator is used in SQL to perform a search that is not within a specified range of values. It allows you to exclude values that fall between two given values. The case sensitivity of the operator does not matter, so it can be written as "Not Between", "not between", "Not between", or "not Between" as well.

Submit
15. SQL: Write an sql statement to insert 1227 and 'Manager' into the 'empno' and 'job' column of the dbo.emp table respectively. 

Explanation

SEE: http://msdn.microsoft.com/en-us/library/ms174335.aspx

Submit
16. SQL: What does the wildcard expression % stand for?

Explanation

The wildcard expression % in SQL stands for zero or more characters. This means that when using the % wildcard in a SQL query, it can match any sequence of characters of any length. It is commonly used in conjunction with the LIKE operator to perform pattern matching in SQL queries.

Submit
17. SQL: What does the wildcard underscore operator (_) stand for?

Explanation

The wildcard underscore operator (_) in SQL is used to represent any single character. It can be used in a query to match a single character in a specific position within a string. For example, if we have a column with values like "cat", "bat", and "hat", we can use the underscore operator to search for all three-letter words that end with "at" by using the pattern '_at'. This will return all the matching rows with values "cat", "bat", and "hat".

Submit
View My Results

Quiz Review Timeline (Updated): Mar 20, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 05, 2011
    Quiz Created by
    Ifeanyiisitor
Cancel
  • All
    All (17)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
SQL: What operator would you use to find values that are not in a...
SQL: what operator is used to perform a search that matches a range of...
T-SQL: What keyboard shortcut do you use in sql server management...
SQL: What operator is used to compare against null values?
SQL: What operator(s) is used to compare against values that are not...
SQL: What operator would you use to compare against values that are...
T-SQL: A column name can be specified without using the 'AS'...
  ...
SQL: What is the 'not equals' operator?
SQL: What operator is used for negation?
SQL: What operator do you use to perform wildcard matches?  
T-SQL: You have a table with a colum entitled 'job', whose...
T-SQL: What is the format for the 'date' datatype?
SQL: What operator(s) can be used to perform a search that is not in a...
SQL: Write an sql statement to insert 1227 and 'Manager' into...
SQL: What does the wildcard expression % stand for?
SQL: What does the wildcard underscore operator (_) stand for?
Alert!

Advertisement