SQL Data Base 2

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 Emadeid
E
Emadeid
Community Contributor
Quizzes Created: 5 | Total Attempts: 2,550
| Attempts: 204 | Questions: 25
Please wait...
Question 1 / 25
0 %
0/100
Score 0/100
1. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

The given SQL statement selects all the rows from the "Emp" table where the value in the "sal" column is between 1000 and 2000. Since the statement is valid and will return a result, the correct answer is True.

Submit
Please wait...
About This Quiz
SQL Quizzes & Trivia

إمتحان أعمال السنة
الفرقة الثالثة
قواعد بيانات 2
للعام الدراسى 2011 - 2012

2. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

This SQL statement selects all the rows from the "Emp" table where the "sal" column value is between 1000 and 2000. Therefore, the correct answer is true.

Submit
3. SQL is Is based on American National Standards Institute ( ANSI ) standard SQL

Explanation

The statement is true because SQL (Structured Query Language) is indeed based on the American National Standards Institute (ANSI) standard SQL. ANSI is responsible for developing and maintaining standards in various industries, including computer science. In the case of SQL, ANSI has established a standard that defines the syntax and functionality of the language, ensuring compatibility and interoperability across different database management systems. This standardization allows SQL queries and commands to be written and executed consistently across different platforms and databases.

Submit
4. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

The SQL statement "select * from Emp where sal between 1000 and 2000" will return all records from the "Emp" table where the "sal" column value is between 1000 and 2000. Therefore, the answer "True" is correct as the statement will indeed retrieve the desired records.

Submit
5. SQL < select * from Emp where sal between 1000 and 2000 ;

Explanation

The given SQL statement selects all the records from the "Emp" table where the "sal" column value falls between 1000 and 2000. Therefore, the answer "True" indicates that the statement is correct and will retrieve the desired records.

Submit
6. SQL < select name , job , sal from emp where job = 'sales' and sal >1500;

Explanation

The given SQL statement selects the columns "name", "job", and "sal" from the table "emp" where the job is "sales" and the salary is greater than 1500. Since the statement is valid and can be executed without any errors, the answer is true.

Submit
7. SQL < select name ,sal from Emp where name like 'm%';

Explanation

The given SQL statement selects the name and salary columns from the Emp table where the name starts with the letter 'm'. Since the statement is syntactically correct and will return the desired result, the correct answer is true.

Submit
8. SQL Is Manipulates data and table definitions in the data base

Explanation

SQL (Structured Query Language) is a programming language used for managing and manipulating relational databases. It allows users to perform various operations on data, such as inserting, updating, and deleting records, as well as querying and retrieving data from tables. Additionally, SQL can be used to define and modify the structure of database tables, including creating, altering, and dropping tables. Therefore, the statement "SQL manipulates data and table definitions in the database" is true.

Submit
9. A null is not the same as zero or a blank  space .

Explanation

A null refers to the absence of a value, while zero represents a numerical value and a blank space represents an empty character. Therefore, a null is not the same as zero or a blank space, making the statement true.

Submit
10. DDL is SQL commands allows the creating , alteration , and dropping of object from the database.

Explanation

DDL stands for Data Definition Language, and it is a set of SQL commands used to define and manage the structure of a database. These commands include creating tables, altering table structures, and dropping tables or other objects from the database. Therefore, the statement that DDL allows creating, altering, and dropping objects from the database is true.

Submit
11. SQL < select name , sal + 300 from emp

Explanation

The given SQL statement selects the "name" column and adds 300 to the "sal" column from the "emp" table. Since there is no "FROM" clause specified in the statement, it is not a valid SQL syntax. Therefore, the correct answer is False.

Submit
12. Definition of DML is SQL commands allow the inserting , updating , and deletion of objects from the database.

Explanation

The statement is true because DML (Data Manipulation Language) in SQL is used to modify and manipulate data in a database. It includes commands like INSERT, UPDATE, and DELETE, which allow for the insertion, updating, and deletion of objects from the database. Therefore, the given statement accurately defines the purpose of DML in SQL.

Submit
13. SQL < select name , job , sal from emp where (job='sales' or job = 'clerk') and sal < 1700 ;

Explanation

The SQL query is selecting the name, job, and salary of employees from the "emp" table where their job is either "sales" or "clerk" and their salary is less than 1700. Since the query is valid and will return a result, the answer is true.

Submit
14. SQL < select * from Emp where sal between 1000 and 2000

Explanation

The given SQL statement selects all records from the "Emp" table where the "sal" column is between 1000 and 2000. Since the statement is selecting records based on a specific condition, it will return a subset of the data in the table, not all records. Therefore, the correct answer is False.

Submit
15. SQL < select name , job from Emp where sal < = 25000 or job = sales ;

Explanation

The given SQL statement selects the columns "name" and "job" from the table "Emp" where the salary is less than or equal to 25000 or the job is "sales". The correct answer is False because the statement is syntactically incorrect. In SQL, the less than or equal to operator is written as "

Submit
16. SQL < select name ,sal from Emp where name like m%;

Explanation

The given SQL statement is incorrect because the string "m%" is not enclosed in quotes. In SQL, string literals should be enclosed in single quotes. Therefore, the correct syntax for the statement would be "SELECT name, sal FROM Emp WHERE name LIKE 'm%'" to search for names starting with the letter "m". Since the given statement is incorrect, the correct answer is False.

Submit
17. SQL < select min sal , max (sal) from emp;

Explanation

The given SQL statement is incorrect because there is a syntax error. The "max" function should not have a space between "max" and the opening parenthesis. The correct syntax should be "max(sal)". Therefore, the correct answer is False.

Submit
18. Definition of Dcl is SQL commands allow certain DML commands to be undone.

Explanation

The given definition of Dcl is incorrect. Dcl stands for Data Control Language, which is a subset of SQL commands that are used to control access to the database. Dcl commands are used to grant or revoke privileges, such as granting or revoking the ability to select, insert, update, or delete data in a database. Dcl commands do not have the ability to undo DML (Data Manipulation Language) commands. Therefore, the correct answer is False.

Submit
19. SQL < select name , job from Emp where sal>=  25000 or job =sales ;

Explanation

The given SQL statement selects the name and job columns from the Emp table where the salary is greater than or equal to 25000 or the job is equal to "sales". Since the statement is selecting records where either of the conditions is true, the answer is false.

Submit
20. SQL < select name , job from Emp  where sal < = 25000 or job = 'sales' ;

Explanation

The given SQL statement selects the name and job columns from the Emp table where the salary is less than or equal to 25000 or the job is 'sales'. The correct answer is False because the statement is not complete and does not provide a valid SQL query.

Submit
21. SQL < select  * where sal between 1000 and 2000 ;

Explanation

The given SQL statement is incorrect because it is missing the "FROM" clause. The correct syntax should be "SELECT * FROM table_name WHERE sal BETWEEN 1000 AND 2000;". Therefore, the correct answer is False.

Submit
22. SQL < select * from Emp where sal  1000 and 2000 ;

Explanation

This statement is not a valid SQL query. The correct syntax for the WHERE clause in SQL is to use comparison operators such as "=", "", "=", or "". In this case, the query is missing the comparison operator between "sal" and the values 1000 and 2000. Therefore, the correct answer is False.

Submit
23. SQL < select name , job from Emp where sal < = 25000 or job = 'sales' ;

Explanation

The given SQL statement selects the name and job columns from the Emp table where the salary is less than or equal to 25000 or the job is 'sales'. The correct answer is False because the statement is syntactically incorrect. The less than or equal to operator should be written as '

Submit
24. SQL < select name , sal from Emp name like '-a%' ;

Explanation

The given SQL statement selects the columns "name" and "sal" from the table "Emp" where the "name" starts with "-a". Since there is a syntax error in the statement (the keyword "like" is missing), the correct answer is False.

Submit
25. SQL Can be abbreviated

Explanation

SQL cannot be abbreviated. It stands for Structured Query Language and is a standard language used for managing and manipulating relational databases. Abbreviating it would not be appropriate as it would lead to confusion and potential errors in writing and understanding SQL statements.

Submit
View My Results

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

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

  • Current Version
  • Mar 19, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 10, 2011
    Quiz Created by
    Emadeid
Cancel
  • All
    All (25)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL is Is based on American National Standards Institute ( ANSI )...
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL < select * from Emp where sal between 1000 and 2000 ;
SQL < select name , job , sal from emp where job = 'sales'...
SQL < select name ,sal from Emp where name like 'm%';
SQL Is Manipulates data and table definitions in the data base
A null is not the same as zero or a blank  space .
DDL is SQL commands allows the creating , alteration , and dropping of...
SQL < select name , sal + 300 from emp
Definition of DML is SQL commands allow the inserting , updating , and...
SQL < select name , job , sal from emp where (job='sales'...
SQL < select * from Emp where sal between 1000 and 2000
SQL < select name , job from Emp where sal < = 25000 or job =...
SQL < select name ,sal from Emp where name like m%;
SQL < select min sal , max (sal) from emp;
Definition of Dcl is SQL commands allow certain DML commands to be...
SQL < select name , job from Emp where sal>=  25000 or job...
SQL < select name , job from Emp  where sal < = 25000 or...
SQL < select  * where sal between 1000 and 2000 ;
SQL < select * from Emp where sal  1000 and 2000 ;
SQL < select name , job from Emp where sal < = 25000 or job =...
SQL < select name , sal from Emp name like '-a%' ;
SQL Can be abbreviated
Alert!

Advertisement