0% found this document useful (0 votes)
59 views

SQL Final Assessment

Uploaded by

suhas8838
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

SQL Final Assessment

Uploaded by

suhas8838
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

10/23/24, 2:01 PM SQL Final Assessment

Assessment Name - SQL Final Assessment ATTEMPTS LEFT - 1

AKE ASSESSMENT (HTTPS://WINGZ.ITVEDANT.COM/INDEX.PHP/ASSIGNMENT-TEST-STUDENT/RETAKE-TEST?ID=158803)

Total Questions - 50 Score - (47 / 50) 94%

1) Function of arithmetic section is to perform arithmetic operations like addition,


subtraction, multiplication, and division.
A) TRUE 1M
B) FALSE
C) Can be true or false
D) Can not say

2) The process of drawing a flowchart for an algorithm is called __________


A) Performance 1M
B) Evaluation
C) Algorithmic Representation
D) Flowcharting

3) A _______ is a connector showing the relationship between the


representative shapes.
A) line 0M
B) arrow
C) Process
D) box

4) C, BASIC, COBOL, and Java are examples of .. language.


A) low-level 1M
B) computer
C) system programming
D) high-level

5) A set of rules for telling the computer what operations to performs is called a
....
A) Procedural language 1M
B) Natural language
C) Command language
D) Programming language

6) Flowchart and algorithm are used for: 1M

https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 1/8
10/23/24, 2:01 PM SQL Final Assessment

A) Better programming
B) Easy testing and debugging
C) Efficient coding
D) All

7) What is the output of the following expression? not (not (True)) 1M


A) True
B) False
C) -
D) -

8) 1. What is the full form of SQL? 1M


A) Structured Query List
B) Structured Query Language
C) Sample Query Language
D) None of these

9) command used to delete table 1M


A) drop table tablename
B) drop tablename
C) delete table tablename
D) remove tablename

10) command used to see table schema 1M


A) desc tablename
B) describe tablename
C) both of the above
D) none of the above

11) Which is the subset of SQL commands used to manipulate Database


structures, including tables? 1M
A) Data Definition Language(DDL)
B) Data Manipulation Language(DML)
C) DML and DDL
D) None of the Mentioned

12) Which of the following is/are the DDL statements?


A) Create 1M
B) Drop
C) Alter
D) All of the Mentioned

13) Which statement would add a column CGPA to a already defined table
Student 1M
A) ALTER TABLE Student ADD COLUMN (CGPA NUMBER(3,1));
https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 2/8
10/23/24, 2:01 PM SQL Final Assessment

B) ALTER TABLE Student CGPA NUMBER(3,1);


C) ALTER TABLE Student ADD (CGPA NUMBER(3,1));
D) Both A and C

14) By default, sorting by ORDER BY clause is done in which order?


A) Ascending 1M
B) Descending
C) -
D) -

15) The ________ clause is used to list the attributes desired in the result of a
query.
A) Where 1M
B) Select
C) From
D) Distinct

16) Which statement is used to get all data from the student table whose name
starts with p? 1M
A) SELECT * FROM student WHERE name LIKE '%p%';
B) SELECT * FROM student WHERE name LIKE 'p%';
C) SELECT * FROM student WHERE name LIKE '_p%';
D) SELECT * FROM student WHERE name LIKE '%p';

17) The SQL keyword(s) _________ is used with wildcards. 1M


A) LIKE only
B) IN only
C) NOT IN only
D) IN and NOT IN

18) Which among the following will insert data into only name and mark columns
in student table (consider total 4 columns are there in student table)

A) insert into student ("abc",70); 1M


B) insert into student values ("abc",70);
C) insert into student name,mark values ("abc",70);
D) insert into student (name,mark) values ("abc",70);

19) The language used application programs to request data from the DBMS is
referred to as __________
A) DML 0M
B) DDL
C) Query language
D) All of the Mentioned

https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 3/8
10/23/24, 2:01 PM SQL Final Assessment

20) Which keyword is used to specify the foreign key after the table is created? 1M
A) SETUP
B) SET
C) ALTER TABLE
D) SPECIFY

21) What is the role of 'CONSTRAINS' in defining a table in Mysql? 1M


A) Declaring primary key
B) Declaring Foreign Key
C) Restrictions on columns
D) All of the mentioned

22) In which of the following cases a DML statement is not executed? 1M


A) When existing rows are modified
B) When a table is deleted
C) When some rows are deleted
D) All of the above

23) If we want to filter or restrict some rows from the output produced by GROUP BY then we use
_________ clause
A) FILTER 1M
B) WHERE
C) HAVING
D) JOIN

24) Usage of aggregates in WHERE clause is allowed. 1M


A) True
B) False
C) -
D) -

25) Which of the following belongs to an 'aggregate function'? 1M


A) COUNT
B) SUM/AVG
C) MIN/MAX
D) All of the mentioned

26) What will be output of following code


SELECT SUBSTR("QWERTY",2,4)

A) WER 1M
B) WERT
C) WERTY
D) ERTY

https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 4/8
10/23/24, 2:01 PM SQL Final Assessment

27) Which among the following is used with date_format() to get abbreviated
month name ? 1M
A) %a
B) %b
C) %m
D) %M

28) _____ is a join of every row of one table to every row of another table 1M
A) FULL JOIN
B) INNER JOIN
C) CROSS JOIN
D) SELF JOIN

29) Which join is to be used between two tables A and B when the resultant table
needs rows from A and B that matches the condition and rows from A that does
not match the condition?
A) Outer Join 1M
B) Cross Join
C) Inner Join
D) None of the above

30) Which of the following statements are true?


A) INNER JOIN only retrieves those rows from Cartesian Product that satisfy 1 M
the JOIN condition
B) FULL OUTER JOIN is same as CROSS JOIN
C) SELF JOIN is a special type of OUTER JOIN
D) Both A and C

31) Advantage of SQL stored procedure 1M


A) Maintainability
B) Re-use of code
C) Security
D) All

32) Which statement(S) is/are incorrect 1M


A) Stored procedure can be shared by multiple programs
B) Stored procedures are in compiled form.
C) Stored procedure is a group of SQL statements
D) All are correct.

33) which of the following command is used to see all procedure in mysql? 1M
A) show procedure;
B) show all procedure;
C) show procedure status;

https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 5/8
10/23/24, 2:01 PM SQL Final Assessment

D) show procedures status;

34) Default delimiter used by Mysql to execute the sql statement or to separate
two sql statement is........ 1M
A) colon (:)
B) comma(,)
C) semicolon (;)
D) Question Mark (?)

35) which of the following command is used to see all procedure in mysql? 1M
A) show procedure;
B) show all procedure;
C) show procedure status;
D) show procedures status;

36) What is the command to remove procedure? 1M


A) drop procedure procedure_name;
B) remove procedure procedure_name;
C) delete procedure procedure_name;
D) all of the above;

37) Suppose a stored function named PI() is written in the database 'sampdb'. How would
it be called?

A) PI() 1M
B) sampdb.PI()
C) MySQL.PI()
D) db.PI()

38) Programmers cannot control the _______ cursors and the information in it.
A) implicit 1M
B) explicit
C) both a and b
D) Can not say

39) The Implicit cursors are created in order to process the ____ statements. 1 M
A) DDL
B) DCL
C) DML
D) TCL

40) The TRIGGER privilege is used for the table to be able to create and drop
triggers for it.
A) True 1M
B) False
https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 6/8
10/23/24, 2:01 PM SQL Final Assessment

C) -
D) -

41) How can we specifies a row-level trigger? 1M


A) Using ON ROW
B) Using FOR EACH COL
C) Using FOR EACH ROW
D) Using OR ROW

42) How many types of Triggers are there in Mysql? 1M


A) Define, Create
B) Drop, Comment
C) Insert, Update, Delete
D) All of the mentioned

43) Trigger is special type of __________ procedure. 1M


A) Function
B) Stored
C) View
D) Table

44) To list all triggers created in database, following which command is used?
A) list all triggers; 0M
B) list triggers;
C) show triggers;
D) select * from triggers;

45)
Consider the following view:

Create view dept as select empid,name,post from company.

Relation or table company has the following attributes:


empid,name,post,city,salary.

For the query “insert into dept(empid,name,post)values(112,’Harry’,’Admin’);” What are


the values of the attributes city and salary in the relation(table) company.
a.
A) NOT NULL 1M
B) NULL
C) 0
D) Error statement

46) Views are not updatable.


A) True 1M

https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 7/8
10/23/24, 2:01 PM SQL Final Assessment

B) False
C) -
D) -

47) Which one is not the Clause in SELECT statement?


A) WHERE 1M
B) ORDER BY
C) HAVE
D) HAVING

48) Which statement is TRUE about the WHERE Clause?


A) In order to retrieve rows, WHERE Clause is used. 1M
B) In order to group the rows, WHERE Clause is used.
C) In order to select the defined groups, WHERE Clause is used.
D) In order to return the rows, WHERE Clause is used.

49) Which statement is TRUE about the ORDER BY Clause?


A) In order to return the rows in a specific order, ORDER BY Clause is used. 1M
B) In order to group the rows, ORDER BY Clause is used.
C) In order to select the defined groups, ORDER BY Clause is used.
D) None of the above

50) In order to sort the records according to the columns, which clause is used?
A) HAVING 1M
B) GROUP BY
C) ORDER BY
D) None of the above

https://wingz.itvedant.com/index.php/assignment-test-student/exam-view-topic?id=9584&isMax=1 8/8

You might also like