?? procinsertintoxiaoqupicture.sql
字號:
Alter proc procInsertIntoXiaoQuPicture
--功能:用來向表中加入圖形
@Key varchar(20),
@Picture Image,
@PictureSmallDa varchar(50),
@Working varchar(10),
@Ok varchar(10) output --返回數據
As
Declare @a int
if @Working='小區'
Begin
select @a=count(*) from XiaoQu where 小區名稱=@Key
if @a=1 --表明有這個記錄
Begin
update XiaoQu set 圖形=@Picture,圖形大小=@PictureSmallDa where 小區名稱=@Key
End
--if @a<>1 then --表明沒有這個記錄,或有多格條記錄
End
if @Working='房型'
Begin
select @a=count(*) from FangXing where 房型編號=@Key
if @a=1 --表明有這個記錄
Begin
update FangXing set 圖形=@Picture,圖形大小=@PictureSmallDa where 房型編號=@Key
End
--if @a<>1 then --表明沒有這個記錄,或有多格條記錄
End
if @Working='車庫'
Begin
select @a=count(*) from CarRoom where 編號=@Key
if @a=1 --表明有這個記錄
Begin
update CarRoom set 圖形=@Picture,圖形大小=@PictureSmallDa where 編號=@Key
End
--if @a<>1 then --表明沒有這個記錄,或有多格條記錄
End
Go
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -