Select as in sqlalchemy

Viewed 36344

I want to do something like this:

select username, userid, 'user' as new_column  from  users_table.

The columns of the table can be selected using sqlalchemy as follows:

query = select([users_table.c.username, users_table.c.userid])

How do I do the select x as col_x to the query in sqlalchemy?

3 Answers
Related