zoukankan      html  css  js  c++  java
  • SQL 存储过程读取视图数据

    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    
    ALTER procedure [dbo].[proc_GetStoreBoxProductsForOther]
    @userid int
    as
    begin
    select storeid,shopid,shopname,canusetimes,unit,shopprice,isattach,
    istime,displaypic,flashdir,iwidth,iheight,iszorz,typeid,displaymode,
    userid,operation,oriposition,cemeteryid,displayout,isvipbuy from
    view_storeandstorezheuangzhi where
    userid=@userid
     and
    usingout=0
    and
    parentid<=0
    and
    ((heavenid in (select [cemeterysid] from [cemeterys] where [userid]=@userid)) or (heavenid='-1' or heavenid=''))
    end
     
    view_storeandstorezheuangzhi  --为视图
    

      

  • 相关阅读:
    leetcode165
    leetcode63
    leetcode92
    leetcode86
    捣鼓Haskell
    递归操作链表
    treap(堆树)
    贪心策略 — 分数背包
    LeetCode.21
    LeetCode.94
  • 原文地址:https://www.cnblogs.com/LYshuqian/p/2169311.html
Copyright © 2011-2022 走看看