Pages

Wednesday, January 19, 2011

UPDATE

UPDATE

--==============================================[ UPDATE ]=================================================================
--The SQL UPDATE clause changes the data in already existing database row(s) and usually
--we need to add a conditional SQL WHERE clause to our SQL UPDATE statement in order to
--specify which row(s) we intend to update.

--Update table column value (specify the row using Where clause)--
UPDATE Person.Contact
SET Phone = 9550000520, EmailAddress = 'habib.ccna@gmail.com'
WHERE FirstName = 'Habib'

SELECT * FROM Person.Contact
WHERE LastName Like 'sheik%'

No comments:

Post a Comment