Using DELETE Expression In the previous chapter, we have understood what an Update expression does. The next expression that we are going to learn is Delete. The delete operation can be achieved by running delete() method on target table object as given in the following statement − stmt = students.delete() In case of students table, […]
Author Archives: user
Using UPDATE Expression The update() method on target table object constructs equivalent UPDATE SQL expression. table.update().where(conditions).values(SET expressions) The values() method on the resultant update object is used to specify the SET conditions of the UPDATE. If left as None, the SET conditions are determined from those parameters passed to the statement during the execution and/or […]
SQLAlchemy Core – Using Aliases The alias in SQL corresponds to a “renamed” version of a table or SELECT statement, which occurs anytime you say “SELECT * FROM table1 AS a”. The AS creates a new name for the table. Aliases allow any table or subquery to be referenced by a unique name. In case […]