The clause used to filter the result after grouping is the:
Anonymous Quiz
30%
WHERE clause
40%
HAVING clause
20%
SELECT clause
10%
ORDER BY clause
The SQL statement used to grant a privilege (like SELECT or UPDATE) to a user is:
Anonymous Quiz
30%
REVOKE
40%
GRANT
20%
DROP
10%
DELETE
Section 5: #chapter6
And
Section 6: #chapter7
#أساسيات_قواعد_البيانات
#databases_fundamentals
#علم_البيانات الدفـعـ(1)ــة
The DDL command is used to add a new column to an existing table:
Anonymous Quiz
20%
UPDATE TABLE
20%
CREATE TABLE
40%
ALTER TABLE
20%
ADD COLUMN
The purpose of the SET clause in an UPDATE statement is to:
Anonymous Quiz
10%
To specify the condition for the update
30%
To list the table(s) to be updated
60%
To define the new value for the attribute(s)
0%
To restrict the number of rows
Which comparison operator is used to test if a value is within a specified range (inclusive)?
Anonymous Quiz
0%
EXISTS
70%
BETWEEN
20%
LIKE
10%
IN
Which clause is used to group rows that have the same values on one أو more attributes?
Anonymous Quiz
20%
WHERE
40%
HAVING
20%
ORDER BY
20%
GROUP BY
What is the primary function of the AS keyword in the SELECT clause?
Anonymous Quiz
10%
To sort the result set
20%
To define a group
70%
To create an alias for a column or expression
0%
To specify the join condition
To retrieve the names of employees whose salary is NULL, which WHERE condition should be used?
Anonymous Quiz
11%
Salary = NULL
56%
Salary IS NULL
33%
Salary == NULL
0%
Salary NOT EXIST
Which type of join returns only the rows that have matching values in both tables?
Anonymous Quiz
10%
Left Outer Join
40%
Full Outer Join
40%
Inner Join
10%
Right Outer Join
Which clause is evaluated after the GROUP BY clause?
Anonymous Quiz
9%
SELECT
82%
HAVING
0%
FROM
9%
WHERE
Which command is used to remove a view from the database?
Anonymous Quiz
30%
ALTER VIEW
30%
DELETE VIEW
40%
DROP VIEW
0%
REMOVE VIEW
Which clause is optional in the basic SELECT-FROM-WHERE query structure?
Anonymous Quiz
40%
WHERE
10%
FROM
10%
SELECT
40%
All are mandatory
Which constraint is used to ensure that an attribute value is greater than zero?
Anonymous Quiz
18%
CHECK
27%
PRIMARY KEY
36%
NOT NULL
18%
UNIQUE
The ON DELETE SET NULL action is specified for a:
Anonymous Quiz
50%
Candidate Key
10%
Non-key attribute
40%
Foreign Key
0%
Primary Key
The operator NOT IN is used for which type of SQL query?
Anonymous Quiz
0%
Set operation
60%
Aggregate function
20%
Nested query
20%
Join operation
What does the TRUNCATE TABLE command do?
Anonymous Quiz
11%
Removes the table structure and data
22%
Removes only specified rows
11%
Changes the table structure
56%
Removes all rows from a table quickly (DDL)
Which command is used to take away privileges from a user?
Anonymous Quiz
18%
GRANT
36%
DROP
45%
REVOKE
0%
DELETE
Which SQL keyword specifies that the sorting order should be descending?
Anonymous Quiz
50%
ORDER DESC
25%
DESC
25%
ASCENDING
0%
UP
Which aggregate function calculates the average value of a numeric column?
Anonymous Quiz
11%
SUM
67%
AVG
11%
MIN
11%
COUNT
Which of the following commands is considered DML (Data Manipulation Language)?
Anonymous Quiz
0%
ALTER TABLE
57%
DROP TABLE
14%
CREATE TABLE
29%
INSERT INTO