IF EXISTS (SELECT 1 FROM SYS.TABLES WHERE NAME='LD0P0ORGANIZATIONLOGO')
BEGIN
DROP TABLE LD0P0ORGANIZATIONLOGO
END
;
IF EXISTS (SELECT 1 FROM SYS.VIEWS WHERE NAME='LD0V0ORGANIZATIONLOGO')
BEGIN
DROP VIEW LD0V0ORGANIZATIONLOGO
END
;
CREATE TABLE LD0P0ORGANIZATIONLOGO
(
	ID int IDENTITY(1,1) NOT NULL,
	NAME varchar(200) NOT NULL,
	FILENAME varchar(255) NOT NULL,
	CONTENT varbinary(max) NOT NULL,
	MIMETYPE varchar(30) NOT NULL,
	ISDEFAULT bit
)
;
CREATE VIEW LD0V0ORGANIZATIONLOGO AS 
	SELECT * FROM LD0P0ORGANIZATIONLOGO
;	