Modify Data From View Example
CREATE VIEW CountriesView
AS
SELECT * FROM countries ;
INSERT INTO CountriesView(Country_Id, Country_Code, Country_Name)
VALUES (8, 'ESP', 'SPAIN');
Country_Id | Country_Code | Country_Name |
---|---|---|
1 | US | UNITED STATES |
2 | ENG | ENGLAND |
3 | FRA | FRANCE |
4 | DEU | GERMANY |
5 | CAN | CANADA |
6 | AUS | AUSTRALIA |
7 | JPN | JAPAN |
8 | ESP | SPAIN |
UPDATE CountriesView
SET Country_Code='ITA', Country_Name='ITALY'
WHERE Country_Id=8;
DELETE FROM CountriesView WHERE Country_Id=8;