# SQL Data Base 2

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
E
Community Contributor
Quizzes Created: 6 | Total Attempts: 3,062
Questions: 25 | Attempts: 200  Settings  إمتحان أعمال السنة
الفرقة الثالثة
قواعد بيانات 2
للعام الدراسى 2011 - 2012

• 1.

### SQL < select name ,sal from Emp where name like m%;

• A.

True

• B.

False

B. False
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.

Rate this question:

• 2.

### SQL < select name , job from Emp where sal < = 25000 or job = sales ;

• A.

True

• B.

False

B. False
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 "

Rate this question:

• 3.

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

• A.

True

• B.

False

B. False
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.

Rate this question:

• 4.

### SQL < select * from Emp where sal between 1000 and 2000

• A.

True

• B.

False

B. False
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.

Rate this question:

• 5.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 6.

### SQL < select  * where sal between 1000 and 2000 ;

• A.

True

• B.

False

B. False
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.

Rate this question:

• 7.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 8.

### SQL < select * from Emp where sal  1000 and 2000 ;

• A.

True

• B.

False

B. False
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.

Rate this question:

• 9.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 10.

### SQL < select name ,sal from Emp where name like 'm%';

• A.

True

• B.

False

A. True
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.

Rate this question:

• 11.

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

• A.

True

• B.

False

B. False
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 '

Rate this question:

• 12.

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

• A.

True

• B.

False

B. False
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.

Rate this question:

• 13.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 14.

### SQL < select name , sal from Emp name like '-a%' ;

• A.

True

• B.

False

B. False
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.

Rate this question:

• 15.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 16.

### SQL < select min sal , max (sal) from emp;

• A.

True

• B.

False

B. False
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.

Rate this question:

• 17.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 18.

### SQL < select name , sal + 300 from emp

• A.

True

• B.

False

B. False
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.

Rate this question:

• 19.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 20.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 21.

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

• A.

True

• B.

False

B. False
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.

Rate this question:

• 22.

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

• A.

True

• B.

False

A. True
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.

Rate this question:

• 23.

### SQL is Is based on American National Standards Institute ( ANSI ) standard SQL

• A.

True

• B.

False

A. True
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.

Rate this question:

• 24.

### SQL Can be abbreviated

• A.

True

• B.

False

B. False
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.

Rate this question:

• 25.

### SQL Is Manipulates data and table definitions in the data base

• A.

True

• B.

False

A. True
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.

Rate this question:

Related Topics Back to top