Use @DBNAME

if EXISTS(SELECT * FROM sys.columns 
            WHERE Name = N'PwdLastChangeDate' AND Object_ID = Object_ID(N'Person'))
BEGIN
	Execute('ALTER TABLE dbo.Person alter
		     PwdLastChangeDate char(10) NULL')
END
