Got it! Thanks. I threw in the NEWSEQUENTIALID Named Default as well.
Yes, I concur, its a best practice.
--start TSQL
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Building]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
DROP TABLE [dbo].[Building]
END
GO
CREATE TABLE [dbo].[Building] (
BuildingUUID [uniqueidentifier] not null CONSTRAINT [DEFAULT_BuildingUUID]
DEFAULT NEWSEQUENTIALID() ,
BuildingName varchar(64) not null ,
NumberOfFloors int not null CONSTRAINT [DEFAULT_FLOORS] DEFAULT 1 ,
NumberOfSides int not null
)
GO
ALTER TABLE [dbo].[Building] ADD CONSTRAINT [DEFAULT_SIDES] DEFAULT(4) FOR
NumberOfSides
GO
Insert Into dbo.Building ( BuildingName ) values ('Sears Tower')
select * from dbo.Building
>> Stay informed about: Giving a strong name to Default Values