Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Views
1.
2. Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
4. What is a view?
• A view is a “virtual” table that is derived
from other tables
• 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.
• We can add SQL functions, WHERE, and
JOIN statements to a view and present the
data as if the data were coming from one
single table
5. SQL CREATE VIEW SYNTAX
CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition;
6. SQL CREATE VIEW Example
• CREATE VIEW Current_Product_
List AS
SELECT ProductID,ProductName
FROM Products
WHERE Discontinued=No;
The view "Current Product List"
lists all active products (products
that are not discontinued) from
the "Products" table. The view is
created with the following SQL
7. We can query the view above as follows:
• SELECT * FROM [Current Product List];
8. SQL Updating a View
• We can update a view by using the following syntax:
• SQL REPLACE VIEW Syntax
• REPLACE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
9. • SQL Dropping a View
• You can delete a view with the DROP VIEW
command.
• SQL DROP VIEW Syntax
• DROP VIEW view_name
11. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
12. Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com