Query and modify data with Transact-SQL