Basic SQL Quiz By - M Khan

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 Teradatakhan
T
Teradatakhan
Community Contributor
Quizzes Created: 1 | Total Attempts: 194
| Attempts: 194 | Questions: 5
Please wait...
Question 1 / 5
0 %
0/100
Score 0/100
1. Sorts are Alphabetical in SQL, not Logical.

Explanation

In SQL, when sorting data, the default behavior is to sort alphabetically rather than logically. This means that if we have a list of values, SQL will sort them based on their alphabetical order rather than considering their logical order or any specific criteria. For example, if we have a list of numbers, SQL will sort them as if they were strings, resulting in an alphabetical order rather than a numerical order. Therefore, the statement "Sorts are Alphabetical in SQL, not Logical" is true.

Submit
Please wait...
About This Quiz
Basic SQL Quiz By - M Khan - Quiz

Basic SQL Quiz By - M Khan assesses understanding of SQL syntax and operations. It covers topics like sorting, aliasing, query syntax, precedence rules, and wildcard usage, essential for database management skills.

Personalize your quiz and earn a certificate with your name on it!
2. LIKE Keyword uses which two special character ?

Explanation

The LIKE keyword in SQL is used to search for a specified pattern in a column. It supports the use of two special characters: '%' and '_' (underscore). The '%' character is used to represent any sequence of characters, while the '_' character is used to represent a single character. Therefore, the correct answer is % and _ (underscore).

Submit
3. SELECT * FROM Student_table WHERE Grade_pt = 3.0 OR 4.0; What will be the result ?

Explanation

The given SQL query is correct and will not show a syntax error. It will display all the rows from the Student_table where the Grade_pt is either 3.0 or 4.0.

Submit
4. Which one is wrong Alias syntax ?

Explanation

The given syntax "Grade_pt AS AVG" is incorrect because it does not follow the correct alias syntax. In alias syntax, the keyword "AS" is used to assign an alias to a column or expression. The correct syntax would be "Grade_pt AS AVG" where "Grade_pt" is the column or expression being aliased and "AVG" is the alias assigned to it.

Submit
5. What is the order of Precedence in SQL ?

Explanation

The order of precedence in SQL is determined by the use of parentheses, followed by the NOT operator, and then the AND and OR operators. In this case, the correct answer is "( ) NOT AND OR" which means that expressions inside parentheses are evaluated first, followed by the NOT operator, and then the AND and OR operators. This order ensures that the logical operations are performed in the correct sequence, allowing for accurate query results.

Submit
View My Results

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

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

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 06, 2014
    Quiz Created by
    Teradatakhan
Cancel
  • All
    All (5)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Sorts are Alphabetical in SQL, not Logical.
LIKE Keyword uses which two special character ?
SELECT * FROM Student_table ...
Which one is wrong Alias syntax ?
What is the order of Precedence in SQL ?
Alert!

Advertisement