Skip to main content

Posts

Showing posts from 2018

Interview Questions and Answers on SQL Server View

    W hat is a View?        Views are virtual tables that hold data from one or more tables. It is a query stored in the database as object. A view does not contain any data itself, it is a set of queries that are applied to one or more tables that are stored within the database as an object   What is the use of view? It allows you to reuse code without  having to write the same complex SQL code over and over. Views are used for security purposes in databases. Views restrict the user from viewing certain columns and rows. In other words, using a view we can apply the restriction on accessing specific rows and columns for a specific user  Can we use ORDER BY clause inside a view?   The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is specified. Can we update a view?       If the view contains joins between mult...