Northwind Database (Document! X Sample)
Production.ProductPhoto Table
AdventureWorks Database > Production Schema : Production.ProductPhoto Table
Description
Product images.
Properties
Creation Date27/10/2017 14:33
File GroupPRIMARY
Text File GroupPRIMARY
System Object
Published for Replication
Rows101
Data Space Used2,280.00 KB
Index Space Used16.00 KB
Columns
 Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
Primary Key Primary key for ProductPhoto records.Integer4   
 Small image of the product.LongVarBinary16  
 Small image file name.VarWChar50  
 Large image of the product.LongVarBinary16  
 Large image file name.VarWChar50  
 Date and time the record was last updated.DBTimeStamp4 
(getdate())
 
Indexes
IndexDescriptionPrimaryUnique
Primary key (clustered) constraint
Relationships
RelationshipDescription
Foreign key constraint referencing ProductPhoto.ProductPhotoID.
Objects that depend on Production.ProductPhoto
 Database ObjectObject TypeDescriptionDep Level
Production.ProductProductPhoto tableProduction.ProductProductPhotoTableCross-reference table mapping products and product photos.1
SQL
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [Production].[ProductPhoto](
    [ProductPhotoID] [int] IDENTITY(1,1) NOT NULL,
    [ThumbNailPhoto] [varbinary](max) NULL,
    [ThumbnailPhotoFileName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [LargePhoto] [varbinary](max) NULL,
    [LargePhotoFileName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_ProductPhoto_ProductPhotoID] PRIMARY KEY CLUSTERED 
(
    [ProductPhotoID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

ALTER TABLE [Production].[ProductPhoto] ADD  CONSTRAINT [DF_ProductPhoto_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
See Also

Related Objects

Production Schema
AdventureWorks Database