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

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

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