SQL CREATE VIEW - Overview, syntax

          

SQL CREATE VIEW - Overview, syntax


SQL CREATE VIEW - Introduction and syntax

<<Previous  Next>>

SQL - Dec 03, 2008 at 18:00 PM by Rajmeet Ghai

Explain the SQL CREATE VIEW statement. Write SQL syntax for the SQL CREATE VIEW statement along with an example.

SQL CREATE VIEW: A view is a virtual table. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.

Syntax:
CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition

Example:
CREATE VIEW [sample] AS
SELECT employeeID,employeeName
FROM employee
WHERE salary > 10000


Explain the SQL UNION ALL statement. Write SQL syntax for the SQL UNION ALL statement along with an example.

SQL UNION ALL: The UNION ALL operator is used to combine the result-set of two or more SELECT statements Tables of both the select statement ................

SQL Server method to insert data

Brief about Insert Statement with an example.
Brief about Select….into statement with an example.
Brief about Bulk copy with an example.
Describe how bcp command prompt utility is used to import and export data.
Describe how bulk insert statement is used to import data..........

SQL ORDER BY

ORDER BY: It is used to sort columns of a result set. It sorts columns in ascending order by default. DESC can be used to sort in a descending order..............

SQL MINUS

SQL MINUS returns all rows in the first query that are not returned in the second query..................

SQL INTERSECT

SQL INTERSECT allows combining results of two or more select queries. If a record exists in one query and not in the other, it will be omitted from the INTERSECT results..............

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring