Python Forum

Full Version: SQlite3 quickly increment INT value?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a slick +=1 for INT values in an SQLite3 table?

For example, a table named 'users'
name, gamesplayed
a suedo code example of what I'm looking for would be.
c.execute(FROM users WHERE name=? SET gamesplayed=? ,("Gary", gamesplayed+=1))
c.execute('UPDATE users SET gamesplayed = gamesplayed + 1 WHERE name = ?', ['Gary'])