Reputation: 513
Suppose Table domains contains a cloumn 'dname'. It consists of 'india.com', russia.net', 'brazil.com', 'canada.biz' etc. I need to update table 'domain' where rows of column 'name' ends with .com. Please help
Upvotes: 1
Views: 55
Reputation: 7678
UPDATE domains SET col_name = 'column_value' WHERE dname LIKE '%.com';
Syntax for this one is
UPDATE table_name SET col_name = 'column_value' WHERE column_name LIKE '%___';
Upvotes: 1
Reputation: 13465
Try this::
update
domain
set column='your value'
where
`name` like '%.com'
Upvotes: 1