Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 7 - DQL (Data Query Language)
Current Quiz Count:45
Progress
0%
Q1
True / False

The '<>' operator can be used to find rows where a column value is not equal to a specified value.

Q2
True / False

Using '!=' and '<>' in SQL Server will result in the same output.

Q3
True / False

The '<>' operator cannot be used with string data types in SQL Server.

Q4
True / False

The '<>' operator is case-sensitive when comparing string values.

Q5
True / False

In SQL Server, the '<>' operator can be used to compare NULL values.

Q6
True / False

Using '<>' in a WHERE clause will filter out rows where the column value is equal to the specified value.

Q7
True / False

The '<>' operator can be used in a JOIN condition to exclude matching rows from the result set.

Q8
True / False

The '<>' operator will not work with numeric data types.

Q9
True / False

The '<>' operator can be used in a CASE statement to specify conditions for different outcomes.

Q10
True / False

The '<>' operator can be used in an UPDATE statement to modify rows that do not meet a specific condition.

Q11
True / False

When using the '<>' operator in a query, it will not affect the performance of the query.

Q12
True / False

In a query with multiple conditions, using '<>' with AND will return rows that satisfy all conditions.

Q13
True / False

The '<>' operator cannot be used in combination with other operators like 'AND' or 'OR' in a WHERE clause.

Q14
True / False

Using the '<>' operator will return rows with NULL values in the specified column.

Q15
True / False

In SQL Server, '<>' and '!=' are completely interchangeable.

Q16
Single Choice

Which of the following queries will correctly select rows where the column 'Age' is not equal to 30?

SQL Code
SELECT * FROM Employees
WHERE Age <> 30;
Q17
Single Choice

Which of the following will return rows where the column 'Salary' is not equal to 50000?

SQL Code
SELECT * FROM Employees
WHERE Salary != 50000;
Q18
Single Choice

Which of these statements correctly selects rows where 'Department' is not equal to 'HR'?

SQL Code
SELECT * FROM Employees
WHERE Department <> 'HR';
Q19
Single Choice

How would you exclude rows where 'Status' is 'Active'?

SQL Code
SELECT * FROM Orders
WHERE Status <> 'Active';
Q20
Single Choice

Which query retrieves records where 'Position' is not 'Manager'?

SQL Code
SELECT * FROM Staff
WHERE Position != 'Manager';
Q21
Single Choice

How would you exclude rows where the 'Category' is 'Electronics'?

SQL Code
SELECT * FROM Products
WHERE Category <> 'Electronics';
Q22
Single Choice

Which of these queries retrieves rows where 'Experience' is not equal to 5 years?

SQL Code
SELECT * FROM Candidates
WHERE Experience != 5;
Q23
Single Choice

Which statement will select rows where 'ProjectStatus' is not 'Completed'?

SQL Code
SELECT * FROM Projects
WHERE ProjectStatus <> 'Completed';
Q24
Single Choice

How do you select rows where 'OrderAmount' is not equal to 1000?

SQL Code
SELECT * FROM Sales
WHERE OrderAmount <> 1000;
Q25
Single Choice

Which query retrieves rows where 'SkillLevel' is not equal to 'Expert'?

SQL Code
SELECT * FROM Skills
WHERE SkillLevel != 'Expert';
Q26
Single Choice

How would you write a query to exclude rows where 'Region' is 'North America'?

SQL Code
SELECT * FROM Regions
WHERE Region <> 'North America';
Q27
Single Choice

Which query will select rows where 'ProductID' is not equal to 100?

SQL Code
SELECT * FROM Products
WHERE ProductID <> 100;
Q28
Single Choice

How would you write a query to exclude rows where 'VendorName' is 'Acme Corp'?

SQL Code
SELECT * FROM Vendors
WHERE VendorName <> 'Acme Corp';
Q29
Single Choice

Which query retrieves rows where 'Discount' is not equal to 0?

SQL Code
SELECT * FROM Sales
WHERE Discount <> 0;
Q30
Single Choice

How do you write a query to exclude rows where 'OrderStatus' is 'Shipped'?

SQL Code
SELECT * FROM Orders
WHERE OrderStatus <> 'Shipped';
Q31
Multiple Choice

Which of the following queries correctly select rows where 'ProductName' is not equal to 'Gadget'?

SQL Code
SELECT * FROM Inventory
WHERE ProductName <> 'Gadget';
Q32
Multiple Choice

Which of the following will retrieve rows where 'Year' is not equal to 2021?

SQL Code
SELECT * FROM Events
WHERE Year <> 2021;
Q33
Multiple Choice

How would you select rows where 'Price' is not equal to 100?

SQL Code
SELECT * FROM Products
WHERE Price <> 100;
Q34
Multiple Choice

Which statements will exclude rows where 'JobTitle' is 'Analyst'?

SQL Code
SELECT * FROM Employees
WHERE JobTitle <> 'Analyst';
Q35
Multiple Choice

Which of these queries will correctly select rows where 'Rating' is not 5?

SQL Code
SELECT * FROM Reviews
WHERE Rating <> 5;
Q36
Multiple Choice

How would you write a query to exclude rows where 'Availability' is 'In Stock'?

SQL Code
SELECT * FROM Inventory
WHERE Availability <> 'In Stock';
Q37
Multiple Choice

Which of the following will exclude rows where 'Budget' is 5000?

SQL Code
SELECT * FROM Projects
WHERE Budget <> 5000;
Q38
Multiple Choice

Which of the following queries will retrieve rows where 'Location' is not 'New York'?

SQL Code
SELECT * FROM Offices
WHERE Location <> 'New York';
Q39
Multiple Choice

Which queries will select rows where 'EmployeeStatus' is not 'Active'?

SQL Code
SELECT * FROM EmployeeStatus
WHERE EmployeeStatus <> 'Active';
Q40
Multiple Choice

How would you write a query to select rows where 'TransactionType' is not 'Credit'?

SQL Code
SELECT * FROM Transactions
WHERE TransactionType <> 'Credit';
Q41
Multiple Choice

Which of the following queries will correctly select rows where 'Grade' is not equal to 'A'?

SQL Code
SELECT * FROM Students
WHERE Grade <> 'A';
Q42
Multiple Choice

How would you write a query to exclude rows where 'PublicationYear' is 2020?

SQL Code
SELECT * FROM Books
WHERE PublicationYear <> 2020;
Q43
Multiple Choice

Which of the following queries will retrieve rows where 'DeliveryStatus' is not 'Delivered'?

SQL Code
SELECT * FROM Deliveries
WHERE DeliveryStatus <> 'Delivered';
Q44
Multiple Choice

How do you write a query to exclude rows where 'Branch' is 'Downtown'?

SQL Code
SELECT * FROM Branches
WHERE Branch <> 'Downtown';
Q45
Multiple Choice

Which of the following queries will select rows where 'CustomerID' is not 101?

SQL Code
SELECT * FROM Customers
WHERE CustomerID <> 101;