ColumName DataType Not Straightly Mentioned in the Table.

Some times we can create table without mentioning column data type straightly.
For eg:
o
CREATE TABLE [dbo].[Customer]
(
[CustomerID] [int] NOT NULL IDENTITY(1, 1),
[CustomerName] [varchar] (50) NOT NULL,
[CreditLine] [smallmoney] NULL,
[OutStandingBalance] [smallmoney] NULL,
[AvailableCredit] AS ([CreditLine]-[OutStandingBalance]),
[CreationDate] [datetime] NOT NULL
) ON [PRIMARY]

Here if we observe AvailableCredit datatype is not mentioned. But in the alias the result it takes as smallmoney.

Comments

Popular posts from this blog

Always On FailOver Events

The transaction log for database is full due to 'OLDEST_PAGE'

SSAS Cube or Database backup with Powershell command "Backup-AsDatabase"