[Python] Python list in SQL query as parameter [duplicate]

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    I have a Python list, say

    l = [1,5,8]


    I want to write a SQL query to get the data for all the elements of the list, say

    select name from students where id = |IN THE LIST l|


    How do I accomplish this?

    Continue reading...

Compartilhe esta Página