1. A method for generating an execution plan for updating and retrieving data from a database in a single process, the method comprising: (a) receiving a statement by a server to update a database with a first set of data and to retrieve a second set of data from the database; (b) building a first execution plan to update the database with the first set of data; (c) building a second execution plan to retrieve the second set of data from the database; and (d) building a single execution plan comprising a combination of the first and second execution plans.