A table Students has a column called name which stores the names of the students. What will be the correct query to display the names of the students in reverse order?
Select name from students reverse; 0.0%
Select name from students reverse name; 0.0%
Select name from students order by name descending; 0.0%
Select name from students order by name reverse; 0.0%
Select name from students order by name desc; 100.0%
Select desc name from students; 0.0%
Select reverse name from students; 0.0%
Choose the appropriate query for the Products table where data should be displayed primarily in ascending order of the ProductGroup column. Secondary sorting should be in descending order of the Cu...
Select * from Products order by CurrentStock,ProductGroup 0.0%
Select * from Products order by CurrentStock DESC,ProductGroup 0.0%
Select * from Products order by ProductGroup,CurrentStock 0.0%
Select * from Products order by ProductGroup,CurrentStock DESC 100.0%
None of the above 0.0%
Consider the following table structure of students: rollno number(4) name varchar(20) course varchar(20) What will be the query to display the cour...
Select course from students where count(course) > 5; 0.0%
Select course from students where count(*) > 5 group by course; 0.0%
Select course from students group by course; 0.0%
Select course from students group by course having count(*) > 5; 100.0%
Select course from students group by course where count(*) > 5; 0.0%
Select course from students where count(group(course)) > 5; 0.0%
Select count(course) > 5 from students; 0.0%
None of the above 0.0%
Consider the following tables: Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book on a scale of 1 to 10) Language (such as French, Eng...
select authorname from authors where authorid in (select authorid from books where popularityrating<5) 100.0%
select authorname from authors where authorid in (select authorid from books where popularityrating<=5) 0.0%
select authorname from authors where authorid in (select BookId from books where popularityrating<5) 0.0%
select authorname from authors where authorid in (select authorid from books where popularityrating in (0,5)) 0.0%
select bookname from books where language='German' and popularityrating = (select popularityrating from books where language='French') 0.0%
select bookname from books where language='German' and popularityrating > (select popularityrating from books where language='French') 0.0%
select bookname from books where language='French' and popularityrating > (select max(popularityrating) from books where language='German') 0.0%
select bookname from books where language='German' and popularityrating > (select max(popularityrating) from books where language='French') 100.0%
select bookname from books where language='French' and popularityrating = (select max(popularityrating) from books where language='French') 100.0%
select bookname from books where language='French' and popularityrating = (select max(popularityrating) from books Having language='French') 0.0%
select bookname,max(popularityrating) from books where language='French' and max(popularityrating) 0.0%
select bookname,max(popularityrating) from books where language='French' having max(popularityrating) 0.0%
Examine the code given below: SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 Which of the following statements is correct with regard to this code?
It returns employees whose salary is 50% more than $23,000 0.0%
It returns employees who have 50% commission rate or salary greater than $23,000 100.0%
It returns employees whose salary is 50% less than $23,000 0.0%
None of the above 0.0%
Examine the two SQL statements given below: SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC What is ...
The two statements produce identical results 100.0%
The second statement returns an error 0.0%
There is no need to specify DESC because the results are sorted in descending order by default 0.0%
How many foreign key constraints can a table have?
1 0.0%
2 0.0%
3 0.0%
4 0.0%
5 0.0%
6 0.0%
None of the above 100.0%
In an RDBMS, which term is used to describe 'data about data'?
Meta data 100.0%
Data dictionary 0.0%
Database 0.0%
None of the above 0.0%
The overall logical structure of a database can be expressed graphically by:
Data Flow Chart 0.0%
Flow Chart 0.0%
Directed Chart 0.0%
Entity-Relationship Diagram 100.0%
None of the above 0.0%
The primary key index does not allow ________ data in a field.
Numeric 0.0%
Characte 0.0%
Date 0.0%
Null 46.0%
Duplicate 53.0%
All of the above 0.0%
The simplest query must include at least________ and _________.
A select clause 50.0%
A where clause 0.0%
A from clause 50.0%
A group by clause 0.0%
A having clause 0.0%
An order by clause 0.0%
What are the programs that execute automatically whenever DML operations are performed on tables called?
Triggers 100.0%
Procedures 0.0%
Functions 0.0%
None of the above 0.0%
What clause should be used to display the rows of a table in ascending order of a particular column?
Where 0.0%
Order By 100.0%
Group By 0.0%
Having 0.0%
First Group By and then Having 0.0%
Like 0.0%
Between 0.0%
What does MOD() function do?
Returns the remainder after division 100.0%
Modifies the column definition 0.0%
Modifies the definition of a table 0.0%
None of the above 0.0%
What does the following Update statement do? Update OrderTable set OrderDiscount=OrderDiscount*1.10
Increases OrderDiscount of first row by 10% 0.0%
Increases OrderDiscount of all rows by 10% 100.0%
Does nothing without where clause 0.0%
Gives an error due to lack of where clause 0.0%
What does the term DDL stand for?
Data Description Language 0.0%
Dynamic Data Language 14.0%
Data Definition Language 85.0%
Data Derived Language 0.0%
Descriptive Data Language 0.0%
What is the correct order of clauses in the select statement? 1 select 2 order by 3 where 4 having 5 group by
1,2,3,4,5 14.0%
1,3,5,4,2 85.0%
1,3,5,2,4 0.0%
1,3,2,5,4 0.0%
1,3,2,4,5 0.0%
1,5,2,3,4 0.0%
1,4,2,3,5 0.0%
1,4,3,2,5 0.0%
When a table is dropped using a simple DROP statement, SQL performs some more operations simultaneously, select all the valid operations?
Removes all rows from the table 53.0%
Drops all the table's indexes 46.0%
Removes all dependent views 0.0%
Removes all dependent procedures 0.0%
Which character function should be used to return a specified portion of a character string?
CONCAT 0.0%
LENGTH 0.0%
SUBSTR 100.0%
INITCAP 0.0%
Which component of an RDBMS validates the syntax of the user's query?
Query Parse 100.0%
The Database Manage 0.0%
Query Optimization 0.0%
Database Administrato 0.0%
Which logical operator can reverse the result?
AND 0.0%
OR 0.0%
NOT 100.0%
ANY 0.0%
Which of the following are aggregate functions in SQL?
Avg 40.0%
Select 0.0%
Order By 0.0%
Sum 40.0%
Union 0.0%
Group by 20.0%
Having 0.0%
Which of the following is not a SQL operator?
Between..and.. 0.0%
Like 0.0%
In 0.0%
Is null 0.0%
Having 100.0%
Not in 0.0%
Which of the following operation is invalid with respect to dates?
date + numbe 0.0%
date * numbe 28.0%
date - numbe 0.0%
date - date 71.0%
date + number/24 0.0%
Which of the following statements is true? (a)The Insert statement creates new rows (b)The Update statement modifies the table structure
only (a) is true 100.0%
only (b) is true 0.0%
oth (a) and (b) are true 0.0%
oth (a) and (b) are false 0.0%
Which one of the following correctly selects rows from the table myTable that have null in column column1?
SELECT * FROM myTable WHERE column1 is null 100.0%
SELECT * FROM myTable WHERE column1 = null 0.0%
SELECT * FROM myTable WHERE column1 EQUALS null 0.0%
SELECT * FROM myTable WHERE column1 NOT null 0.0%
SELECT * FROM myTable WHERE column1 CONTAINS null 0.0%
Which operator will be evaluated first in the following statement: select (age + 3 * 4 / 2 - 8) from emp
+ 0.0%
- 0.0%
/ 0.0%
* 100.0%
You want to display the titles of books that meet the following criteria: 1. Purchased before November 11, 2002 2. Price is less than $500 or greater than $900 You want to sort the result by th...
SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < '11/11/2002' ORDER BY purchase_date; 0.0%
SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date< '11/11/2002' ORDER BY purchase_date ASC; 0.0%
SELECT book_title FROM books WHERE (price < 500 OR price >900) AND purchase_date DESC; 0.0%
SELECT Book_title FROM books WHERE (price < 500 OR price >900) AND purchase_date<'11/11/2002' ORDER BY purchase_date DESC; 100.0%