V
V
VKR2282021-04-01 04:12:05
Python
VKR228, 2021-04-01 04:12:05

How to clear sqlite?

How to clear the base? Tried: And nothing, gives out
sql.execute(f"""DELETE from items""")

Process finished with exit code 0

I tried everything I found in Google, the base is in place! Only drop worked, but you need to delete all values ​​in the database

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
o5a, 2021-04-01
@o5a

Database and table are two different things.
To clear the table, just the specified delete command will do. Just don't forget to commit after that.

Z
ztx511, 2021-04-01
@ztx511

@client.command()
async def deletes(ctx):
    cursor.execute("DELETE DATABASE users")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question