SQL Test
________ is an operation that displays rows which meet a condition.
_________ is the operation that displays certain columns from the table.
< and > are examples of _________ type of operators.
A company has the following departments: Marketing , Designing , Production , Packing What will be the result of the following query? select * from table where department < 'Marketing';
A construction company is currently executing three projects- hotel construction, residential construction and business towers. The construction company employs both Civil Engineers and Structural ...
A production house has two sales outlets. Both outlets are maintaining their data separately in schemas A and B respectively. The Management wants to see the sale of both outlets in one report. Bot...
A production house needs a report about the sale where total sale of the day is more than $20,000. Which query should be used?
A table has following values for its department field: marketing, production, production, sales, NULL, NULL, Marketing, Null What will the following query return: Select distinct(department) fro...
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?
An association of several entities in a Entity-Relation model is called?
An RDBMS performs the following steps: 1)It calculates the results of the group functions of each group 2)It groups those rows together based on the group by clause 3)It orders the groups based on ...
Are both the statements correct? (a)where deptno in(2,4,5) (b)where deptno=2 or deptno=4 or deptno=5
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...
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, English, German etc) Subjec...
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...
Consider the following two tables: 1. customers( customer_id, customer_name) 2. branch ( branch_id, branch_name ) What will be the output if the following query is executed: Select *, bran...
Consider the query: SELECT name FROM Student WHERE name LIKE '_a%'; Which names will be displayed?
Data validation can be implemented at the data definition stage through:
Evaluate the following SQL statement: SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_...
Every Boyce-Codd Normal Form(BCNF)is in:
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?
Examine the data in the EMPLOYEES table given below: LAST_NAME DEPARTMENT_ID SALARY ALLEN 10 3000 MILLER 20 1500 KING ...
Examine the description of the STUDENTS table: STD_ID NUMBER (4) COURSE_ID VARCHAR2 (10) START_DATE DATE END_DATE DATE The aggregate functions valid on the ST...
Examine the query:- select (2/2/4) from tab1; where tab1 is a table with one row. This would give a result of:
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 tru...
For which SQL operation is Alter Table used?
How can data be accessed by users who do not have direct access to the tables?
How many foreign key constraints can a table have?
Identify the incorrect statement/s regarding constraints.
If E1 and E2 are relational algebra expressions, then which of the following is NOT a relational algebra expression?
If entity x is existence-dependent on entity y then what is x said to be?
In which sequence are queries and sub-queries executed by the SQL Engine?
In which type of database is SQL used?
Point out the incorrect statement regarding group functions:
Select all the appropriate options.
The concept of data independence is similar to the concept of ________
The Employee table uses alphanumeric characters for their Employee ID field, which contains 7 digits prefixed with 3 characters. The alphanumeric characters refer to the department code. You want t...
The level of abstraction which describes only part of the entire database is called?
The level of data abstraction which describes how the data is actually stored is?
The names of those departments where there are more than 100 employees have to be displayed. Given two relations, employees and departments, what query should be used? Employee --------- Empno Empl...
The overall logical structure of a database can be expressed graphically by:
The purpose of the domain is to constrain the set of valid values. True or false?
The simplest query must include at least________ and _________.
The STUDENT_GRADES table has these columns: STUDENT_ID NUMBER (12) SEMESTER_END DATE GPA NUMBER (4) Which of the following statements finds the highest Grade Point Ave...
There are two tables A and B. You are retreiving data from both tables where all rows from B table and only matching rows from A table should be displayed. Which type of join you will apply between...
View the following Create statement: 1 Create table Pers 2 (EmpNo Number(4) not null, 3 EName Char not null, 4 Join_dt Date not null, 5 Pay Number) Which line contains an error?
What are the columns of a table called in a relational model?
What are the programs that execute automatically whenever DML operations are performed on tables called?
What clause should be used to display the rows of a table in ascending order of a particular column?
What does MOD() function do?
What does the term DDL stand for?
What is a cluster?
What is a rollback of transactions normally used for?
What is the collection of information stored in a database at a particular moment called?
What is the correct order of clauses in the select statement? 1 select 2 order by 3 where 4 having 5 group by
What is the error in the following query if the Students table contains several records? select name from students where name = (select name from students order by name);
What is the order of precedence among the following operators? 1 IN 2 NOT 3 AND 4 OR
What is wrong with the following query: select * from Orders where OrderID = (select OrderID from OrderItems where ItemQty > 50)
What items, other than column names can be included in the select clause?
What will happen if you query the emp table as shown below: select empno, DISTINCT ename, Salary from emp;
When a table is dropped using a simple DROP statement, SQL performs some more operations simultaneously, select all the valid operations?
Where should sub queries be used?
Which are not DCL operations?
Which character function should be used to return a specified portion of a character string?
Which component of an RDBMS validates the syntax of the user's query?
Which logical operator can reverse the result?
Which of the following are aggregate functions in SQL?
Which of the following can be used to uniquely identify a row?
Which of the following constraints cannot be applied at the table level?
Which of the following date function(s) are invalid in Oracle SQL?
Which of the following field names are correct?
Which of the following is not a DDL command?
Which of the following is not a DML command?
Which of the following is not a feature of SQL?
Which of the following is not a numeric group function?
Which of the following is not a relational operation?
Which of the following is not a set operator?
Which of the following is not a single value function?
Which of the following is not a SQL operator?
Which of the following is not a type of constraint?
Which of the following is not the benefits of views?
Which of the following statement is correct regarding table creation?
Which of the following statements are incorrect regarding definition of simple and complex views?
Which of the following statements are not true regarding the primary key?
Which of the following statements are true?
Which of the following statements are wrong about primary keys?
Which of the following statements is true? (a)The Insert statement creates new rows (b)The Update statement modifies the table structure
Which of the following statements regarding views are incorrect?
Which one of the following correctly selects rows from the table myTable that have null in column column1?
Which operator will be evaluated first in the following statement: select (age + 3 * 4 / 2 - 8) from emp
Which query will display data from the Pers table relating to Analysts, Clerks and Salesmen who joined between 1/1/2005 and 1/2/2005 ?
Which statement is correct for FIRST NORMAL FORM?
Which statements are true for views?
With regard to statement (a) and statement (b), Which of the following option is correct. (a)The FLOOR function returns the smallest integer greater or equal to the argument. (b)The CEIL function ...