Update String Columns without Using Single Quotations - General Question
- by peace
UPDATE CustomerPhone
SET PhoneTypeID = 7, PhoneNumber = 999-444
WHERE CustomerID = 500 AND PhoneNumber = 9-1-1;
PhoneNumber is of type varchar(20) whereas PhoneTypeID and CustomerID are of type int. I'm running the above statement in SQL Server, it works fine.
I wonder how come it works? I thought any string value has to be put between '...'