You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
sql-tools/添加image.sql

30 lines
1.0 KiB

--新增
IF EXISTS (SELECT 1 FROM sysobjects WHERE name = 'PInsertObjectImage' AND type = 'P')
BEGIN
DROP PROCEDURE PInsertObjectImage
END
GO
CREATE PROCEDURE PInsertObjectImage
(
@ObjectType VARCHAR(30), --对象类型
@ObjectId BIGINT, --对象名称
@ImageName VARCHAR(50), --图片名称
@ImageUrl VARCHAR(200) --图片地址
)
AS
BEGIN
INSERT INTO TObjectImage(FObjectType,FObjectId,FImageName,FImageUrl)
VALUES(@ObjectType,@ObjectId,@ImageName,@ImageUrl)
END
GO
EXEC PInsertObjectImage 'WeChatApp',1,'Image1','133570300204611449.jpg'
EXEC PInsertObjectImage 'WeChatApp',1,'Image2','152940188035191562.jpg'
EXEC PInsertObjectImage 'WeChatApp',1,'Image3','245083528050135303.jpg'
EXEC PInsertObjectImage 'WeChatApp',1,'Image4','564166001346514633.jpg'
EXEC PInsertObjectImage 'WeChatApp',1,'Image5','704419746959654004.jpg'
EXEC PInsertObjectImage 'WeChatApp',1,'Image6','774451114783562010.jpg'
EXEC PInsertObjectImage 'Company',1,'Avatar','logo.jpg'
EXEC PInsertObjectImage 'WeChatApp',1,'Logo','logo.jpg'