Questions tagged [updatable-views]
30 questions
55
votes
1 answer
Is it possible to insert data into a MySQL view?
I made a MySQL view with 4 tables. Is it possible to insert data into the view and have MySQL automatically pass the data into the right table?

mullek
- 2,131
- 4
- 17
- 12
6
votes
3 answers
UPDATE on seemingly key preserving view in Oracle raises ORA-01779
Problem
I'm trying to refactor a low-performing MERGE statement to an UPDATE statement in Oracle 12.1.0.2.0. The MERGE statement looks like this:
MERGE INTO t
USING (
SELECT t.rowid rid, u.account_no_new
FROM t, u, v
WHERE t.account_no =…

Lukas Eder
- 211,314
- 129
- 689
- 1,509
5
votes
1 answer
How to create updatable views in TSQL
How to make an updatable view in TSQL. Please provide simple examples that I can base my solution on.
Lately I was helping my friend with TSQL, and he asked me about updatable views. I thought it will be a good idea to leave my solution here for the…

Falcon
- 650
- 1
- 8
- 24
5
votes
1 answer
Microsoft SQL Server (MSSQL) updatable view with multiple base tables and full performance
I am using MSSQL 2008 R2. It has the handy feature of updatable views. For example if I have one table t mapping id to name:
create table t (id int not null primary key, name varchar(100) not null unique)
and then another table giving some ids and…

Ed Avis
- 1,350
- 17
- 36
2
votes
1 answer
Default values for updatable views in Oracle
Lets say I have something like the following:
create table tab
(
data varchar2(100),
source number
);
create view source_1 as
(
select data from tab where source = 1
);
create view source_2 as
(
select data from tab where source = 2
);
I…

Clinton
- 22,361
- 15
- 67
- 163
2
votes
1 answer
Updating rows of updatable view with ResultSet.updateRow function
I have updatable view on PostgreSQL server.
Update query works fine when I execute it from pgAnmin3 console, but when I try to update this view with ResultSet.updateRow() method, I get the following error:
org.postgresql.util.PSQLException: No…

Сергей Хорлаб
- 21
- 3
1
vote
1 answer
Can CRUD operations be performed on Oracle Views
I know this is kind of vague, but I'm new to views and am trying to learn what they're capable of.
Let's say I create a view created by complex queries using a combination of tables. If I tried to edit a record in the view, would the view be smart…

user973479
- 1,629
- 5
- 26
- 48
1
vote
3 answers
Should multiple tables be referenced in the SELECT statement when creating a mysql view?
http://www.mysqltutorial.org/create-sql-updatable-views.aspx
This article above states the following:
SELECT statement must not reference
to more than one table. It means it
must not contain more than one table
in FROM clause, other tables in…

Keeper Hood
- 594
- 5
- 17
1
vote
0 answers
Updatable mysql views keeping null values
We've table1 with columns (id, firstname, lastname, gender).
Then table2 with columns (manid, bodyfat, mandate, matchid)
Then table3 with columns (womanid, bodyfat, womandate, wmatchid)
So, here i want to make an updatable mysql view with columns…

thanos_zach
- 156
- 4
- 20
1
vote
1 answer
PhpPgAdmin Syntax error when creating View
I am attempting to create a View in PhpPgAdmin (PostGreSQL db) which has the following SQL statement:
DELETE FROM myTable WHERE myTable.error IS NULL;
PhpPgAdmin gives me the following error:
ERROR: syntax error at or near "DELETE" at character…

Ted1391
- 139
- 3
- 12
1
vote
1 answer
Unable to create an updatable MySql view
I am trying to create an updatable view in MySql, but the result is not updatable. Attrepgen is a table where the first field (aidx = numauto) is the PK.
Any idea why attrepusr is not updatable ?
CREATE
ALGORITHM = UNDEFINED
DEFINER =…

Philippe Huysmans
- 13
- 4
1
vote
2 answers
SQL Server Database - Allowing application to edit records in a view?
I made a custom view for a group of three tables. How would I configure the view so that it can be edited by an application using it like a table? I am using SQL Server Studio Express.

Joshua Enfield
- 17,642
- 10
- 51
- 98
1
vote
1 answer
Updatable View via Form?
Is it possible to update data via a form without binding the form to the original table?
We need users to update a small subset of data within the main table to which the SQL view is mapped, below is an example of the code used to update the…

iggyweb
- 2,373
- 12
- 47
- 77
1
vote
1 answer
What is the use of updatable views in Oracle SQL?
I've been looking and can't find anywhere that list the benefits of using an updatable view (one that can be modified with the modifications affecting the target table).
I understand why materialized views are useful (speed, security, etc) but since…

DanielST
- 13,783
- 7
- 42
- 65
1
vote
2 answers
How can I update a view with columns that is derived from case statement?
I created a view using this (neglected other columns):
create view view_table (is_root) as select
case when C1 = 'Yes' then 1
when C1 = 'No' then 0
else 0
end as is_root
from remote_db_table
But when I tried to update the view…

SwiftMango
- 15,092
- 13
- 71
- 136