The query tag is used to run a SQL query and get a collection of results. To update a database row, use the update tag. The transaction tag is used to atomically execute a set of SQL statements.