Table: [AdventureWorks2016CTP3].[Person].[PersonPhone]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [Person]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  82099333
 Located on  PRIMARY
 Data size KB  1184 KB
 Index size KB  992 KB
 Rows  19972
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID]
 Filetable streamid unique   
 Filetable fullpath unique   
 Filetable is enabled   
 Is memory optimized   
 Durability  SCHEMA_AND_DATA

Collapse image Creation options


Name  Value 
QUOTED_IDENTIFIER ON
ANSI_NULLS ON
ANSI_PADDING ON

Collapse image Columns


    Name  Description  Data type  Max length  Nullable  Default IsGUID  SPARSE Computed value
Primary key Foreign key BusinessEntityID     int 4        
Primary key   PhoneNumber     [dbo].[Phone] 25        
Primary key Foreign key PhoneNumberTypeID     int 4        
    ModifiedDate     datetime 8   (getdate())    
Total: 4 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID] BusinessEntityID   2176 0
[IX_PersonPhone_PhoneNumber] PhoneNumber       976 0
Total: 2 Index/indexes

Collapse image Columnstore indexes


No columnstore indexes exist

Collapse image Referenced tables


Table  Primary key or unique constraint  Foreign key 
[Person].[Person] PK_Person_BusinessEntityID FK_PersonPhone_Person_BusinessEntityID
[Person].[PhoneNumberType] PK_PhoneNumberType_PhoneNumberTypeID FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID
Total: 2 table(s)

Collapse image Objects that depend on [Person].[PersonPhone]


Object name Object type Dep level
[HumanResources].[vEmployee] View 1
[Sales].[vIndividualCustomer] View 1
[Sales].[vSalesPerson] View 1
[Sales].[vStoreWithContacts] View 1
[Purchasing].[vVendorWithContacts] View 1
Total 5 object(s)

Collapse image Objects that [Person].[PersonPhone] depends on


Object name Object type Dep level
[Person] Schema 1
[Person].[Person] Table 1
[Person].[PhoneNumberType] Table 1
[dbo].[Phone] Datatype 1
Total 4 object(s)

Collapse image Extended properties


Name  Value 
MS_Description Telephone number and type of a person.

Collapse image Table options


Name  Value 
Pintable OFF
Table lock on bulk load OFF
Insert row lock OFF
Text in row 0
Large value types out of row OFF

Collapse image SQL


SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
CREATE TABLE [Person].[PersonPhone] (
        [BusinessEntityID]      [int] NOT NULL,
        [PhoneNumber]           [dbo].[Phone] NOT NULL,
        [PhoneNumberTypeID]     [int] NOT NULL,
        [ModifiedDate]          [datetime] NOT NULL,
        CONSTRAINT [PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID]
        PRIMARY KEY
        CLUSTERED
        ([BusinessEntityID], [PhoneNumber], [PhoneNumberTypeID])
    ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'CONSTRAINT', N'PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'INDEX', N'PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID'
GO
ALTER TABLE [Person].[PersonPhone]
    ADD
    CONSTRAINT [DF_PersonPhone_ModifiedDate]
    DEFAULT (getdate()) FOR [ModifiedDate]
GO
ALTER TABLE [Person].[PersonPhone]
    WITH CHECK
    ADD CONSTRAINT [FK_PersonPhone_Person_BusinessEntityID]
    FOREIGN KEY ([BusinessEntityID]) REFERENCES [Person].[Person] ([BusinessEntityID])
ALTER TABLE [Person].[PersonPhone]
    CHECK CONSTRAINT [FK_PersonPhone_Person_BusinessEntityID]

GO
ALTER TABLE [Person].[PersonPhone]
    WITH CHECK
    ADD CONSTRAINT [FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID]
    FOREIGN KEY ([PhoneNumberTypeID]) REFERENCES [Person].[PhoneNumberType] ([PhoneNumberTypeID])
ALTER TABLE [Person].[PersonPhone]
    CHECK CONSTRAINT [FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID]

GO
CREATE NONCLUSTERED INDEX [IX_PersonPhone_PhoneNumber]
    ON [Person].[PersonPhone] ([PhoneNumber])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'INDEX', N'IX_PersonPhone_PhoneNumber'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Business entity identification number. Foreign key to Person.BusinessEntityID.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'COLUMN', N'BusinessEntityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Telephone number identification number.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'COLUMN', N'PhoneNumber'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', 'COLUMN', N'PhoneNumberTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Telephone number and type of a person.', 'SCHEMA', N'Person', 'TABLE', N'PersonPhone', NULL, NULL
GO

Collapse image See also


List of tables