create trigger OrderAds on  HR_Ads
          for insert
          as
          begin
          declare @OrderId int
          select @OrderId=isnull(max(Order_ID),0)+1 from [HR_Ads]
          update HR_Ads set Order_ID =@OrderId where Gid=(Select Gid from Inserted)
          --select * from inserted
          end

           


          文章來源:http://www.cnblogs.com/wangdetian168/archive/2008/11/28/1343228.html
          posted on 2010-10-09 10:57 sanmao 閱讀(98) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 奉贤区| 镇坪县| 调兵山市| 仲巴县| 香格里拉县| 南溪县| 台江县| 西吉县| 鹤壁市| 马尔康县| 大名县| 嘉兴市| 新宁县| 巴塘县| 曲麻莱县| 广平县| 密云县| 景宁| 南开区| 汉中市| 赫章县| 石台县| 南通市| 左云县| 开鲁县| 攀枝花市| 调兵山市| 新晃| 依安县| 枣强县| 会昌县| 留坝县| 平乡县| 武宁县| 赤壁市| 石柱| 嘉义县| 亳州市| 方城县| 永兴县| 芦山县|