Do You Know Views In SQL Server?

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By SQLSERVERQUEST
S
SQLSERVERQUEST
Community Contributor
Quizzes Created: 1 | Total Attempts: 286
Questions: 5 | Attempts: 286

SettingsSettingsSettings
Do You Know Views In SQL Server? - Quiz

SQL Server View Knowledge Testing


Questions and Answers
  • 1. 

    Can we use Order by in SQL Server Views?

    • A.

      NO

    • B.

      YES

    • C.

      Some Cases Yes

    Correct Answer
    C. Some Cases Yes
    Explanation
    Order by in view in SQL Server can be used with top operator only.

    Rate this question:

  • 2. 

    Can we create index on View ?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Yes, we can create an index on a view. A view is a virtual table that is based on the result of a query. While the view itself does not store any data, it can be used to simplify complex queries or provide a customized view of the data. By creating an index on a view, we can improve the performance of queries that involve the view by allowing the database to retrieve the data more efficiently.

    Rate this question:

  • 3. 

    In updatable view the number of tables which got affected ?

    • A.

      Only one base table

    • B.

      All base table

    • C.

      No base table

    • D.

      Update is not possible in view

    Correct Answer
    A. Only one base table
    Explanation
    In an updatable view, only one base table is affected. This means that any updates made to the view will only modify the data in one specific table, rather than affecting multiple tables. This is because an updatable view is a virtual table that is derived from one or more base tables, and any changes made to the view are ultimately reflected in the corresponding base table. Therefore, the correct answer is "only one base table".

    Rate this question:

  • 4. 

    View can reference temporary tables ?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Views cannot reference temporary tables. Temporary tables are created and used within a session and are not accessible outside of that session. Views, on the other hand, are stored database objects that can be accessed by multiple sessions. Therefore, views cannot reference temporary tables.

    Rate this question:

  • 5. 

    Derived columns are updatable in SQL Server View?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Derived columns are not updatable in SQL Server View. A derived column is a column that is calculated based on other columns in the view. Since it is a calculated column, it does not have a physical existence in the underlying table and therefore cannot be updated directly. To update the value of a derived column, you would need to update the values of the underlying columns that it is based on.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 03, 2014
    Quiz Created by
    SQLSERVERQUEST

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.