Recipe 4.7. Blocking Inserts to Certain Columns
Problem
You wish to prevent users, or an errant software application, from inserting values into certain table columns. For example, you wish to allow a program to insert into EMP, but only into the EMPNO, ENAME, and JOB columns.
Solution
Create a view on the table exposing only those columns you wish to expose. Then force all inserts to go through that view.
For example, to create a view exposing the three columns in EMP:
create view new_emps as select empno, ename, job from emp
It is also possible, but perhaps less useful, to insert into an inline view (currently only supported by Oracle):
insert into (select empno, ename, job from emp) values (1, 'Jonathan', 'Editor')
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23895263/viewspace-681055/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Blocking ElementsBloC
- CSS columnsCSS
- 5.編寫recipe
- PostgreSQL DBA(174) - PG 13(Allow inserts to trigger autovacuum)SQL
- Color Rows and Columns
- SQL Server阻塞blocking案例分析SQLServerBloC
- Cross-Origin Read Blocking (CORB)ROSBloCORB
- CSS3 columnsCSSS3
- 使用 Recipe 安裝 SAP Commerce CloudCloud
- Deployer recipe中Laravel配置檔案Laravel
- Poor Performance On Certain Dictionary Queries After Upgrade To 10gORMAI
- F. Color Rows and Columns
- CSS columns 多列布局CSS
- PostgreSQL DBA(79) - Locks(pg_blocking_pids)SQLBloC
- alter table drop unused columns checkpoint
- PostgreSQL DBA(53) - PG 12 Generated columnsSQL
- CSS columns多列布局瀑布流CSS
- [Javascript] Refactor blocking style code to stream style for fetching the stream dataJavaScriptBloC
- Datatables學習筆記——columns.render筆記
- SAP PP C201使用ECR建立Recipe主資料
- CF2000F Color Rows and Columns 題解
- codeforces 1209E1 Rotate Columns (easy version)
- leetcode講解--944. Delete Columns to Make SortedLeetCodedelete
- columns陣列形式展示不同列資料陣列
- NBIO 第二彈 —— 支援 Non-Blocking HTTP 1.xBloCHTTP
- JQuery Datatables Columns API 引數詳細說明jQueryAPI
- 碰見一個BLOCKING_SESSION顯示不正確的BUGBloCSession
- New ownerAnyone Bug Allows For Anyone to ''Own'' Certain ERC20-Based Smart Contracts (CVE-2018-10705AI
- SAP PP使用ECR去修改Recipe主資料,報錯:Generation not supported
- 題解:CF1209E1 Rotate Columns (easy version)
- MySQL information_schema.columns表查詢慢原因分析MySqlORM
- Added non-passive event listener to ascroll- blocking ‘mousewheel‘event Consider marking event handlBloCIDE
- 基於async/non-blocking高效能redis元件庫BeetleX.RedisBloCRedis元件
- SAP Hybris使用recipe進行安裝時,是如何執行ant命令的?
- CSS並不簡單:多欄佈局(Multi-Columns Layout)CSS
- 使用 CSS columns 佈局來實現自動分組佈局CSS
- ocp 19c考題,科目082考試題(22)- drop columns
- Minecraft中BossBar、Recipe的底層實現與擴充套件應用(學習筆記)Raft套件筆記
- 修改MySQL資料型別報 Changing columns for table XXX 錯的問題MySql資料型別