Is it possible to create a view to insert a query

I created the table name "viewex"

create table viewex(
    sno int,
    name varchar(30),
    email varchar(30),
    address varchar(50),
    contact varchar(30)
);

Insert data into a table.

Now I'm interested in inserting data for only 3 columns (name, address, contact):

insert into viewex(name, address, contact) values('celcabs', 'good', 'bad');

Now the problem: .......... Is it possible to create a view for the request

insert into viewex(name, address, contact) values('celcabs', 'good', 'bad');
+5
source share
2 answers

As of PostgreSQL 9.3, you can insert and update "simple views": http://www.postgresql.org/docs/9.3/static/sql-createview.html

+9
source

What you are looking for is updatable view, and postgresql does not have direct support for them.

, CREATE RULE - , .

+3

All Articles