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 […]
SQLAlchemy Core – Executing Expression In the previous chapter, we have learnt SQL Expressions. In this chapter, we shall look into the execution of these expressions. In order to execute the resulting SQL expressions, we have to obtain a connection object representing an actively checked out DBAPI connection resource and then feed the expression object […]
SQLAlchemy Core – SQL Expressions In this chapter, we will briefly focus on the SQL Expressions and their functions. SQL expressions are constructed using corresponding methods relative to target table object. For example, the INSERT statement is created by executing insert() method as follows − ins = students.insert() The result of above method is an […]