SQL Multiple choices


Total available count: 51
Subject - Databases
Subsubject - SQL

With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?


 

 

 

 



B


Solution:-

The SQL BETWEEN Operator
The BETWEEN operator selects values within a given range. The values can be text, numbers, or dates. The BETWEEN operator has included the beginning and end values. 

BETWEEN Syntax is written as bellows:

SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2;

BETWEEN Example is written as bellows:
The following SQL statement selects all Courses with a duration BETWEEN 3 months and 12 months:

Example

SELECT * FROM Courses WHERE Price BETWEEN 3 months AND 12 months;

 




Next 5 multiple choice(s)

1

With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

2

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

3

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

4

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

5

With SQL, how do you select all the columns from a table named "Persons"?

Comments