테이블 Truncate 함수 추가

This commit is contained in:
jaehwang committed 2025-11-10 11:02:56 +09:00
1 parent a951d0d1b6
commit 9196ed08b4
2 files changed
+14

No files matched your search

+13
View File
@@ -227,3 +227,16 @@ async def delete_blog_from_id(blog_id:int):
return
async def truncate_user_table():
async with await get_cnx() as cnx:
async with await cnx.cursor() as cur:
query = '''
TRUNCATE TABLE user_table
'''
await cur.execute(query)
await cnx.commit()
return