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
EN
DE
RU
FR
ES
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
How to select a column named "ProductName" from a table named "Products" with SQL?
EXTRACT ProductName FROM Products
SELECT ProductName FROM Products
SELECT Products.ProductName
Next >
2/25
Which SQL statement is used to delete data from a table?
TRUNCATE
DELETE
REMOVE
Next >
3/25
Once AUTOCOMMIT is set on, changes will be made automatically at the end of every SQL statement.
True
False
Next >
4/25
How else can the table columns be called?
Attributes
Fields
Records
Next >
5/25
How do you create a new table named 'Employees' with columns 'EmployeeID' (integer) and 'EmployeeName' (varchar)?
CREATE TABLE Employees (EmployeeID int, EmployeeName varchar)
NEW TABLE Employees (EmployeeID int, EmployeeName string)
CREATE Employees (EmployeeID integer, EmployeeName text)
TABLE Employees ADD (EmployeeID int, EmployeeName varchar)
Next >
6/25
Which SQL statement adds a 'Salary' column to the 'Employees' table?
ALTER TABLE Employees ADD COLUMN Salary int
UPDATE TABLE Employees ADD Salary int
MODIFY TABLE Employees ADD Salary int
INSERT INTO Employees (Salary) VALUES (int)
Next >
7/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 >
8/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 >
9/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 >
10/25
Which SQL statement is used to set a default value for a column?
SET DEFAULT
ALTER TABLE ... SET DEFAULT
MODIFY COLUMN ... DEFAULT
UPDATE COLUMN ... SET DEFAULT
Next >
11/25
How can you combine results from multiple SELECT statements in SQL?
USING UNION
WITH COMBINE
USING UNION ALL
USING JOIN
USING UNION or UNION ALL
Next >
12/25
Which of the following is a valid SQL aggregate function?
COLLECT()
COMBINE()
SUM()
CONNECT()
Next >
13/25
Which SQL statement is used to return the number of records in the 'Employees' table?
COUNT(Employees)
SELECT COUNT(*) FROM Employees
GET NUMBER OF Employees
SELECT ROWS FROM Employees
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
Which SQL function is used to return the current date and time?
GETDATE()
CURRENT_TIMESTAMP
NOW()
DATETIME()
TIMESTAMP()
Next >
16/25
Which SQL clause is used to filter the results of a GROUP BY operation?
FILTER BY
HAVING
WHERE
GROUP WHERE
Next >
17/25
What does the following SQL statement do: SELECT EmployeeName, SUM(Salary) OVER (PARTITION BY DepartmentID) FROM Employees?
Summarizes the total salary for each department
Displays an error as the syntax is incorrect
Displays the sum of salaries within each department for each employee
Calculates the overall sum of salaries in the Employees table
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
What is the purpose of the SQL 'WITH' clause?
To provide a temporary name to a table or a set of columns
To define a temporary subquery block that can be used in a SELECT statement
To specify the conditions for a join
To initialize variables within an SQL query
Next >
20/25
Which SQL clause is used to specify a condition while fetching data from a single table or joining multiple tables?
HAVING
WHERE
ON
AND
Next >
21/25
What is the purpose of the 'GROUP BY' clause in SQL?
To group rows that have the same values in specified columns into summary rows
To group the output of a SQL query by the values of a specific column
To sort the result set of a query by the specified column values
To filter rows based on the condition specified by the aggregate function
Next >
22/25
Which SQL statement is used to return only distinct (different) values?
SELECT UNIQUE column_name FROM table_name
SELECT DISTINCT column_name FROM table_name
SELECT DIFFERENT column_name FROM table_name
SELECT column_name FROM table_name DISTINCT
Next >
23/25
How can you insert multiple rows into a table named 'Orders'?
INSERT INTO Orders VALUES (value1, value2), (value3, value4)
INSERT MULTIPLE INTO Orders VALUES (value1, value2), (value3, value4)
ADD INTO Orders VALUES (value1, value2), (value3, value4)
INSERT INTO Orders VALUES (value1, value2) AND (value3, value4)
Next >
24/25
Which SQL clause is used to sort the result set in ascending or descending order?
SORT BY
ORDER BY
ARRANGE BY
SEQUENCE BY
Next >
25/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 >
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.