본문 바로가기

카테고리 없음

Update As Select In Oracle Examples Schema

Update as select in oracle examples schema 2016
  1. Update As Select In Oracle Examples Schema Examples
  2. Update As Select In Oracle Examples Schema List

Update As Select In Oracle Examples Schema Examples

» » » Here Updates Based on QueriesThis article describes how a table can be updated using data from another table.Related articles.SetupThe DESTTAB table contains 10,000 rows. The SOURCETAB table contains 5,000 rows, each of which has a matching key value with a row from the DESTTAB table, but different data in the CODE and DESCRIPTION columns.DROP TABLE desttab PURGE;DROP TABLE sourcetab PURGE;CREATE TABLE desttab ASSELECT level AS id,'CODE' level AS code,'Description for ' level AS descriptionFROM dualCONNECT BY level The aim is to update the rows in the DESTTAB table with the data from the SOURCETAB table. Subquery MethodThe first option is to do an update of the DESTTAB table using a subquery to pull the correct data from the SOURCETAB table. Notice the EXISTS predicate to exclude rows from the DESTTAB table with no matching row in the SOURCETAB table.

I can't figure out how to use those views that you suggest for listing all grants that USERB received.GRANT SELECT, UPDATE, DELETE, INSERT ON USERA.TABLE1 TO USERB;I query: select. from alltables where owner='USERA'shows 16 rowsSelect. from alltabprivsrecd where grantor = 'USERA'shows 0 rowsSelect. from alltabprivsrecd where grantee = 'USERA'shows 0 rowsSelect. from alltabprivsrecd where grantee = 'USERB'shows 0 rowsSelect.

Update As Select In Oracle Examples Schema List

from alltabprivsrecd where grantor = 'USERB'shows 129 rows, but USERA is not in grantee, nor in grantor nor in owner.