If Exists (Select * From sysobjects Where name = N'Logon' And user_name(uid) = N'dbo')
Drop Table dbo.Logon
Go
Create Table dbo.Logon
(
PersonId int Not Null,
Password nvarchar(32) Not Null Constraint DF_Logon_Password Default ('temp' + convert(varchar(6),@@identity)),
UserName nvarchar(32) Not Null,
test nvarchar(32) Null Constraint DF_Logon_test Default ('temp' + convert(varchar(26),rand(1)))
)
Go
Alter Table dbo.Logon Add Constraint
PK_Logon Primary Key Nonclustered
(
PersonId
)
Go