Rules for Updating Results
In many cases, you can update the
In general, in order to update results, the Query Designer must have sufficient information to uniquely identify the row in the table. An example is if the query includes a
If your query is based on a
Note The Query Designer cannot determine in advance whether you can update a result set based on a view. Therefore, it displays all views, even though you might not be able to update them.
The following table summarizes specific instances in which you might and might not be able to update query results in the Results pane.
Query | Can results be updated? |
---|---|
Query based on one table with primary key in the output list | Yes (except as listed below). |
Query based on a table with no unique |
Query must contain sufficient information to uniquely identify records. |
Query based on multiple tables which are not |
No. |
Query based on data marked as read-only in the database | No. |
Query based on a view that involves one table with no |
Yes (except as listed below). |
Query based on tables joined with a |
Yes (except as listed below). |
Query based on tables joined with a |
Usually. |
Query based on three or more tables in which there is a |
No. |
Query based on a table for which update permission is not granted | Can delete but not update. |
Query based on a table for which delete permission is not granted | Can update but not delete. |
No. | |
Query based on a |
No. |
Query that includes the DISTINCT keyword to exclude duplicate rows | No. |
Query whose FROM clause includes a user-defined function that returns a table and the user-defined function contains multiple select statements | No. |
Query whose FROM clause includes an inline use- defined function | Yes. |
In addition, you might not be able to update specific columns in the query results. The following list summarizes specific types of columns that you cannot update in the Results pane.
- Columns based on
expressions - Columns based on scalar user-defined functions
- Rows or columns deleted by another user
- Rows or columns locked by another user (locked rows can usually be updated as soon as they are unlocked)
- Timestamp or
BLOB columns