SQL CREATE VIEW - Introduction and syntax
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
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 ................
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..........
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 returns all rows in the first query that are not returned in the
second query..................
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..............
|