Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find duplicate row in python sqlite database

for name in ('AlixaProDev','Salamn'): 
    cursor.execute("SELECT rowid FROM Student WHERE Name = ?", (name,))
    db_result=cursor.fetchall()
    if len(db_result)==0:
        print('There is no Student named %s'%name)
    else:
        print('Student %s found with rowids %s'%(name,','.join(map(str, next(zip(*db_result))))))Copy Code
Source by www.alixaprodev.com #
 
PREVIOUS NEXT
Tagged: #find #duplicate #row #python #sqlite #database
ADD COMMENT
Topic
Name
4+5 =