Technical :: All Aptitude Test ::

Hassan
1.The provides a set of operations that take one or more relations as input and return a relation as an output?
A. Schematic representation
B. Relational algebra
C. Scheme diagram
D. Schematic representation

2.Which one of the following is used to define the structure of the relation, deleting relations and relating schemas?
A. DML(Data Manipulation Language)
B. DDL(Data Definition Language)
C. Query
D. DML(Data Manipulation Language)

3.What type of statement is this?
A. DML
B. DDL
C. View
D. DML

4.What type of statement is this?
A. DML
B. DDL
C. View
D. DML

5.The basic data type char(n) is a length character string and varchar(n) is length character?
A. Fixed, equal
B. Equal, variable
C. Fixed, variable
D. Fixed, equal

6.To remove a relation from an SQL database, we use the command?
A. Delete
B. Purge
C. Remove
D. Delete

7.This command performs which of the following action?
A. Remove relation
B. Clear relation entries
C. Delete fields
D. Remove relation

8.What type of statement is this?
A. Query
B. DML
C. Relational
D. Query

9.Updates that violate which are disallowed?
A. Integrity constraints
B. Transaction control
C. Authorization
D. Integrity constraints

10.Which of these query will display the the table given below?
A. Select employee from name
B. Select name
C. Select name from employee
D. Select employee from name

11.Here which of the following displays the unique values of the column?
A. All
B. From
C. Distinct
D. All

12.The query given below will not give an error. Which one of the following has to be replaced to get the desired output?
A. Salary*1.1
B. ID
C. Where
D. Salary*1.1

13.Which clause is used to list the attributes desired in the result of a query?
A. Where
B. Select
C. From
D. Where

14.This Query can be replaced by which one of the following?
A. Select name,course_id from teaches,instructor where instructor_id=course_id;
B. Select name, course_id from instructor natural join teaches;
C. Select name, course_id from instructor;
D. Select name,course_id from teaches,instructor where instructor_id=course_id;

15.Which of the following fields are displayed as output?
A. Salary, dept_id
B. Employee
C. Salary
D. Salary, dept_id

16.Which of the following employee_id will be displayed for the given query?
A. 1009, 1001, 1018
B. 1009, 1018
C. 1001
D. 1009, 1001, 1018

17.Which of the following statements contains an error?
A. Select * from emp where empid = 10003;
B. Select empid from emp where empid = 10006;
C. Select empid from emp;
D. Select * from emp where empid = 10003;

18.In the given query which of the keyword has to be inserted?
A. Table
B. Values
C. Relation
D. Table

19.Which keyword must be used here to rename the field name?
A. From
B. Rename
C. As
D. From

20.In the SQL given above there is an error . Identify the error.
A. Dept_name
B. Employee
C. “Comp Sci”
D. Dept_name

21.Which one of the following has to be added into the blank to select the dept_name which has Computer Science as its ending string?
A. %
B. _
C. ||
D. %

22.By default, the order by clause lists items in which order?
A. Descending
B. Any
C. Same
D. Descending

23.To display the salary from greater to smaller and name in ascending order which of the following options should be used?
A. Ascending, Descending
B. Asc, Desc
C. Desc, Asc
D. Ascending, Descending

24.In SQL the spaces at the end of the string are removed by function?
A. Upper
B. String
C. Trim
D. Upper

25.Which operator is used for appending two strings?
A. &
B. %
C. ||
D. &

26.What type of statement is this?
A. DML
B. DDL
C. View
D. DML

27.What type of statement is this?
A. DML
B. DDL
C. View
D. DML

28.The basic data type char(n) is a length character string and varchar(n) is length character?
A. Fixed, equal
B. Equal, variable
C. Fixed, variable
D. Fixed, equal

29.To remove a relation from an SQL database, we use the command?
A. Delete
B. Purge
C. Remove
D. Delete

30.This command performs which of the following action?
A. Remove relation
B. Clear relation entries
C. Delete fields
D. Remove relation


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers