Books
Learn HTML
Learn CSS
Learn Git
Learn Javascript
Learn PHP
Learn python
Learn Java
Exercises
HTML
JavaScript
Git
CSS
PHP
Courses
Quizzes
Snippets
Tools
General Tools
Password Generator
HTML Editor
HTML Encoder
Base 64
Code Diff
JSON Beautifier
CSS Beautifier
Markdown Convertor
Find the Closest Tailwind CSS Color
Phrase encrypt / decrypt
Browser Feature Detection
Number convertor
CSS Maker
CSS Maker
CSS Maker text shadow
CSS Maker Text Rotation
CSS Maker Out Line
CSS Maker RGB Shadow
CSS Maker Transform
CSS Maker Font Face
Color Tools
Color Picker
Colors CMYK
Colors HWB
Colors HSL
Color Hex
Color mixer
Color Converter
Colors RGB
Color Contrast Analyzer
Color Gradient
String Tools
String Length Calculator
MD5 Hash Generator
Sha256 Hash Generator
String Reverse
URL Encoder
URL Decoder
Base 64 Encoder
Base 64 Decoder
Extra Spaces Remover
String to Lowercase
String to Uppercase
Word Count Calculator
Empty Lines Remover
HTML Tags Remover
Binary to Hex
Hex to Binary
Rot13 Transform on a String
String to Binary
Duplicate Lines Remover
Change theme
Dark
Light
System
Books
Learn HTML
Learn CSS
Learn Git
Learn Javascript
Learn PHP
Learn python
Learn Java
How To
How To NodeJs
How To Linux
How To AngularJs
How To PHP
How To HTML
How To CSS
How To Symfony
How To Git
How To Apache
How To JavaScript
How To Java
How To Vue.js
How To Python
SQL Basics
1/25
With SQL, how do you select all the columns from a table named "Products"?
SELECT [all] FROM Products
SELECT All Products
SELECT *.Products
SELECT * FROM Products
Next >
2/25
The OR operator shows a record if any conditions listed are true. The AND operator shows a record if all of the conditions listed are true.
True
False
Next >
3/25
Which of the following statements is true about systems information in an RDBMS?
RDBMS stores database definition information in system-created tables.
Such information can be accessed with SQL.
Often, such information cannot be updated by a user.
All of the above.
Next >
4/25
How else can the table columns be called?
Attributes
Fields
Records
Next >
5/25
How do you use a subquery to find names of customers who have placed orders in an 'Orders' table?
SELECT Name FROM Customers WHERE CustomerID IN (SELECT CustomerID FROM Orders)
SELECT CustomerID FROM Orders WHERE Name IN (SELECT Name FROM Customers)
SELECT Name FROM Customers WHERE EXISTS (SELECT CustomerID FROM Orders)
SELECT Name FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID
Next >
6/25
Which SQL data type is used to store fixed-length character strings?
VARCHAR
TEXT
CHAR
STRING
Next >
7/25
How do you create an index on the 'EmployeeName' column of the 'Employees' table for faster queries?
CREATE INDEX ON Employees (EmployeeName)
INDEX Employees ADD EmployeeName
ADD INDEX EmployeeName ON Employees
CREATE Employees INDEX EmployeeName
Next >
8/25
How do you use the GROUP BY clause in conjunction with aggregate functions?
SELECT COUNT(EmployeeID), Department FROM Employees GROUP BY Department
GROUP Employees BY Department WITH COUNT(EmployeeID)
SELECT Department, COUNT(EmployeeID) FROM Employees GROUP BY EmployeeID
SELECT Department FROM Employees GROUP BY COUNT(EmployeeID)
Next >
9/25
How do you update the 'Salary' column in the 'Employees' table for an employee with 'EmployeeID' 123 to 50000?
UPDATE Employees SET Salary = 50000 WHERE EmployeeID = 123
CHANGE Employees SET Salary = 50000 WHERE EmployeeID = 123
MODIFY Employees SET Salary = 50000 WHERE EmployeeID = 123
EDIT Employees SET Salary = 50000 FOR EmployeeID = 123
Next >
10/25
What is the purpose of the 'LIKE' operator in SQL?
To compare a value to similar values using wildcard operators.
To check for exact matches in a column.
To perform mathematical operations.
To limit the number of rows returned in a query.
Next >
11/25
What is the result of executing a SQL statement that includes a WHERE clause with a non-existent value?
An error message.
All records from the table.
No records (an empty result set).
The first record in the table.
Next >
12/25
What does the SQL clause 'LIMIT 10' do when added to a SELECT statement?
Limits the result to the first 10 rows.
Selects only the 10th row.
Limits each column to 10 characters.
Throws an error as 'LIMIT' is not a valid SQL clause.
Next >
13/25
In SQL, what does the 'BETWEEN' operator do?
Checks whether a value lies within a specified range.
Compares two values for equality.
Sorts the result set between two columns.
Divides the result set into two parts.
Next >
14/25
How do you perform a LEFT JOIN between 'Employees' and 'Departments' tables on the 'DepartmentID' column?
SELECT * FROM Employees LEFT JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID
JOIN Employees, Departments USING (DepartmentID)
SELECT * FROM Employees, Departments WHERE Employees.DepartmentID = Departments.DepartmentID
SELECT * FROM Employees JOIN Departments ON DepartmentID
Next >
15/25
What is the result of the following query: SELECT COUNT(DISTINCT EmployeeName) FROM Employees?
The total number of rows in the Employees table
The number of unique employee names in the Employees table
A syntax error
The first unique employee name in the Employees table
Next >
16/25
Which SQL function is used to return the current date and time?
GETDATE()
CURRENT_TIMESTAMP
NOW()
DATETIME()
TIMESTAMP()
Next >
17/25
How do you rename a column 'EmployeeName' to 'FullName' in the 'Employees' table?
ALTER TABLE Employees RENAME COLUMN EmployeeName TO FullName
UPDATE TABLE Employees CHANGE EmployeeName FullName
ALTER TABLE Employees MODIFY COLUMN EmployeeName AS FullName
RENAME COLUMN EmployeeName TO FullName IN Employees
Next >
18/25
How do you delete a table named 'TemporaryData' only if it exists in the database?
DROP TABLE IF EXISTS TemporaryData
DELETE TABLE TemporaryData IF EXISTS
REMOVE TABLE TemporaryData WHEN EXISTS
DROP TABLE TemporaryData ONLY IF EXISTS
Next >
19/25
Which SQL statement is used to change the data type of a column in an existing table?
ALTER TABLE table_name MODIFY column_name new_data_type
UPDATE TABLE table_name SET column_name TYPE new_data_type
CHANGE TABLE table_name column_name new_data_type
MODIFY TABLE table_name column_name SET TYPE new_data_type
Next >
20/25
Which statement is used to add a new row to a table in SQL?
ADD ROW INTO tableName (column1, column2) VALUES (value1, value2)
INSERT INTO tableName (column1, column2) VALUES (value1, value2)
CREATE ROW IN tableName (column1, column2) VALUES (value1, value2)
APPEND INTO tableName (column1, column2) VALUES (value1, value2)
Next >
21/25
How do you find the total number of entries in a table named 'Orders'?
FIND COUNT(*) FROM Orders
SELECT COUNT(*) FROM Orders
COUNT ALL FROM Orders
TOTAL COUNT(*) IN Orders
Next >
22/25
What does the SQL 'UNION' operator do?
Joins the contents of two tables side by side
Combines the results of two or more SELECT statements into a single result set
Updates one table based on the contents of another
Deletes records in one table based on the contents of another
Next >
23/25
How can you retrieve unique values from the column 'EmployeeName' of the 'Employees' table?
SELECT DISTINCT EmployeeName FROM Employees
SELECT UNIQUE EmployeeName FROM Employees
GET ALL UNIQUE EmployeeName FROM Employees
SELECT EmployeeName FROM Employees DISTINCT
Next >
24/25
What is the function of the 'HAVING' clause in SQL?
To specify a search condition for a group or an aggregate function used in SELECT statement
To filter records before the GROUP BY clause
To join multiple tables based on a condition
To specify the order of records
Next >
25/25
What does the SQL 'CROSS JOIN' clause do?
Joins two tables in such a way that each row of the first table is combined with each row of the second table
Joins only the matching rows between two tables
Creates a join that can be filtered using a WHERE clause
Combines rows from two tables based on a related column
Next >
To get the result of the quiz, please provide your email address (optional)..
Get Certificate
It seems you haven't answered any questions yet. Please provide your answers to proceed.