Home > Blockchain >  How to make the database giving me two datas
How to make the database giving me two datas

Time:11-02

Hello my Database (Sqlite3) is giving me just one data from all the database, I want it to give me all datas but I don't know why It didn't, here's what I tried

    c.execute("SELECT type FROM accounts")
    acctype = c.fetchmany()

It gave me just One for Some reasons !

CodePudding user response:

By default, 1 is considered "many"! Use fetchmany(size=2) if you want to fetch the next 2 rows.

If you want all the rows, just use fetchall() instead.

  • Related