Oracle中的包變數

來源:互聯網
上載者:User

  在CS結構系統開發中,Oracle中的包變數常用來做為session的全域變數使用,在操作員登入時給包變數賦值,在本次登入後一直都可以隨時取值。減少傳遞參數的個數,如操作員姓名、子系統名稱等變數。

  而在三層結構系統或Oracle啟用了共用伺服器模式時,就不能這樣使用了。因在三層結構中,用戶端並不與資料庫直接連接,而是通過中介層訪問資料庫。用戶端每次與資料庫的串連並不一定是同一個sesson,因此不能把包變數做為全域變數使用。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.