alternative
  • Home (current)
  • About
  • Tutorial
    Technologies
    C#
    Deep Learning
    Statistics for AIML
    Natural Language Processing
    Machine Learning
    SQL -Structured Query Language
    Python
    Ethical Hacking
    Placement Preparation
    Quantitative Aptitude
    View All Tutorial
  • Quiz
    C#
    SQL -Structured Query Language
    Quantitative Aptitude
    Java
    View All Quiz Course
  • Q & A
    C#
    Quantitative Aptitude
    Java
    View All Q & A course
  • Programs
  • Articles
    Identity And Access Management
    Artificial Intelligence & Machine Learning Project
    How to publish your local website on github pages with a custom domain name?
    How to download and install Xampp on Window Operating System ?
    How To Download And Install MySql Workbench
    How to install Pycharm ?
    How to install Python ?
    How to download and install Visual Studio IDE taking an example of C# (C Sharp)
    View All Post
  • Tools
    Program Compiler
    Sql Compiler
    Replace Multiple Text
    Meta Data From Multiple Url
  • Contact
  • User
    Login
    Register

SQL -Structured Query Language - SQL View - Create View Quiz

# Quiz
1
Discuss
Create View

Which of the following creates a virtual relation for storing the query?

  • 1]

    Function

  • 2]

    View

  • 3]

    Procedure

  • 4]

    None of the mentioned

Solution
2
Discuss
Create View

Which of the following is the syntax for views where v is view name?

  • 1]

    Create view v as “query name”;

  • 2]

    Create “query expression” as view;

  • 3]

    Create view v as “query expression”;

  • 4]

    Create view “query expression”;

Solution
3
Discuss
Create View
SELECT course_id
FROM physics_fall_2009
WHERE building= ’Watson’;

Here the tuples are selected from the view.Which one denotes the view.

  • 1]

    Course_id

  • 2]

    Watson

  • 3]

    Building

  • 4]

    physics_fall_2009

Solution
4
Discuss
Create View

Materialized views make sure that

  • 1]

    View definition is kept stable

  • 2]

    View definition is kept up-to-date

  • 3]

    View definition is verified for error

  • 4]

    View is deleted after specified time

Solution
5
Discuss
Create View

Updating the value of the view

  • 1]

    Will affect the relation from which it is defined

  • 2]

    Will not change the view definition

  • 3]

    Will not affect the relation from which it is defined

  • 4]

    Cannot determine

Solution
6
Discuss
Create View

SQL view is said to be updatable (that is, inserts, updates or deletes can be applied on the view) if which of the following conditions are satisfied by the query defining the view?

  • 1]

    The from clause has only one database relation

  • 2]

    The query does not have a group by or having clause

  • 3]

    The select clause contains only attribute names of the relation and does not have any expressions, aggregates, or distinct specification

  • 4]

    All of the mentioned

Solution
7
Discuss
Create View

Which of the following is used at the end of the view to reject the tuples which do not satisfy the condition in where clause?

  • 1]

    With

  • 2]

    Check

  • 3]

    With check

  • 4]

    All of the mentioned

Solution
8
Discuss
Create View

Consider the two relations instructor and department
Instructor:

ID Name Dept_name Salary
1001 Ted Finance 10000
1002 Bob Music 20000
1003 Ron Physics 50000

Department:

Dept_name Building Budget
Biology Watson 40000
Chemistry Painter 30000
Music Taylor 50000

 

Which of the following is used to create view for these relations together?

  • 1]
    CREATE VIEW instructor_info AS
    SELECT ID, name, building
    FROM instructor, department
    WHERE instructor.dept name= department.dept name;

     

  • 2]
    CREATE VIEW instructor_info 
    SELECT ID, name, building
    FROM instructor, department;

     

  • 3]
    CREATE VIEW instructor_info AS
    SELECT ID, name, building
    FROM instructor;

     

  • 4]
    CREATE VIEW instructor_info AS
    SELECT ID, name, building
    FROM department;

     

Solution
9
Discuss
Create View

For the view Create view instructor_info as

SELECT ID, name, building
FROM instructor, department
WHERE instructor.dept name= department.dept name;

If we insert tuple into the view as insert into instructor info values (’69987’, ’White’, ’Taylor’);
What will be the values of the other attributes in instructor and department relations?

  • 1]

    Default value

  • 2]

    Null

  • 3]

    Error statement

  • 4]

    0

Solution
10
Discuss
Create View

Find the error in this query. 

CREATE VIEW faculty AS
SELECT ID, name, dept name
FROM instructor;

 

  • 1]

    Instructor

  • 2]

    Select

  • 3]

    View …as

  • 4]

    None of the mentioned

Solution
# Quiz
SQL -Structured Query Language

SQL -Structured Query Language

  • Introduction
  • Overview
    • How To Download And Install MySql Workbench
    • SQL Syntax
  • SQL Database
    • Create Database
    • Drop Database
    • Use / Select Database
  • SQL Table
    • Create Table
    • Alter - Rename Table
    • Alter - Add Column
    • Alter - Modify Column
    • Alter - Rename Column
    • Alter - Drop Column
    • Copy Table
    • Drop Table
  • SQL Insert
    • Insert Record
  • Sql Update
    • Update Record
  • Sql Select
    • Select Record
    • Select - Count
    • Select - Average
    • Select - Sum
    • Select - Min Max
    • Select - Distinct
    • Select - Limit
    • Select - First
    • Select - Last
  • Sql Clause
    • Like Clause
    • And Operator
    • Or Operator
    • Between & Not Between Operator
    • As or Alias
    • In Clause
    • Group By Clause
    • Having Clause
  • Sql Order By
    • Ascending
    • Descending
    • Random
    • Ascending Descending Multiple Column
  • SQL Joins
    • Joins and its type
    • Inner Join
    • Left Join
    • Right Join
    • Full Join
    • Cross Join
  • SQL View
    • Create View
    • Update View
    • Delete View
  • SQL Delete
    • Delete Table
    • Truncate Table
  • Sql Key & Constraint
    • Primary Key
    • Foreign Key
    • Unique Key
    • Not Null Constraint
    • Check Constraint
    • Default Constraint
  • Normalization
    • Overview
    • 1 NF
    • 2 NF
    • 3 NF
    • Boyce Codd normal form ( BCNF )

About Fresherbell

Best learning portal that provides you great learning experience of various technologies with modern compilation tools and technique

Important Links

Don't hesitate to give us a call or send us a contact form message

Terms & Conditions
Privacy Policy
Contact Us

Social Media

© Untitled. All rights reserved. Demo Images: Unsplash. Design: HTML5 UP.