
Alter Table [StuClass] ADD [LastBillItemID] int 
GO

Update Student set ExistPhoto=0 where Photo is null
GO

Update Student set ExistPhoto=1 where Photo is not null
GO

Update StuClass set LastBillItemID=BillItemID where LastBillItemID is null or LastBillItemID = 0
GO

Update DBInfo set DateAndTime='2013-06-14'
GO














