你在查询和更新语句中都加上yourtable.store_no = v_storeno这样的条件,
其中v_storeno就是要操作入库表的用户所拥有的仓库代号。

解决方案 »

  1.   

    CABO(白椒腊肉), 系统没有提供这种功能?
      

  2.   

    Lastdrop(空杯) :用yourtable.store_no = v_storeno这样的语句只能限制不懂sql的人,如果用户中有人懂精通sql, 那么系统级的信息安全不等于虚设吗?
      

  3.   

    是不是只有用store proc 才能解决问题呢?
      

  4.   

    同意lastdrop的看法,自己编程限制
    如果用户能够直接访问数据库,嗬嗬,。
      

  5.   

    --Create a login account for the 'test' user
    execute sp_addlogin 'test','1234','Northwind',null
    go
    --Create a group
    execute sp_addgroup 'testgroup'
    go
    --Add the test user to Database
    execute sp_adduser 'test','test','testgroup'
    go
    grant update,insert
    on customers
    to testgroup