Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Classe « Select »

Méthode sqlalchemy.Select.select_from

Signature de la méthode select_from

def select_from(self, *froms: '_FromClauseArgument') -> 'Self' 

Description

help(Select.select_from)

Return a new :func:`_expression.select` construct with the
given FROM expression(s)
merged into its list of FROM objects.

E.g.::

    table1 = table("t1", column("a"))
    table2 = table("t2", column("b"))
    s = select(table1.c.a).select_from(
        table1.join(table2, table1.c.a == table2.c.b)
    )

The "from" list is a unique set on the identity of each element,
so adding an already present :class:`_schema.Table`
or other selectable
will have no effect.   Passing a :class:`_expression.Join` that refers
to an already present :class:`_schema.Table`
or other selectable will have
the effect of concealing the presence of that selectable as
an individual element in the rendered FROM list, instead
rendering it into a JOIN clause.

While the typical purpose of :meth:`_expression.Select.select_from`
is to
replace the default, derived FROM clause with a join, it can
also be called with individual table elements, multiple times
if desired, in the case that the FROM clause cannot be fully
derived from the columns clause::

    select(func.count("*")).select_from(table1)



Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé