Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 SQlite3 quickly increment INT value?
#1
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))
Quote
#2
c.execute('UPDATE users SET gamesplayed = gamesplayed + 1 WHERE name = ?', ['Gary'])
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How can I increment a List item with in a "for in" msteffes 4 310 Aug-14-2019, 08:55 AM
Last Post: DeaD_EyE
  Deleting data in sqlite3 JJ39 3 205 Jun-23-2019, 04:39 PM
Last Post: noisefloor
  Редактировать данные в sqlite3 JJ39 4 267 Jun-20-2019, 07:31 PM
Last Post: Larz60+
  How define iteration interval increment SriMekala 5 388 Jun-01-2019, 01:06 PM
Last Post: ichabod801
  sqlite3 question - execute method with :parameter richalt2 2 210 May-20-2019, 05:35 PM
Last Post: woooee
  Sqlite3 help with descending order I_Am_Groot 4 176 May-18-2019, 12:45 AM
Last Post: I_Am_Groot
  sqlite3 window functions support using python2.7 Omkumar 2 241 May-03-2019, 11:57 AM
Last Post: Gribouillis
  how can a sqlite command like import be executed using sqlite3 (python) Larz60+ 1 237 Mar-08-2019, 01:17 AM
Last Post: Larz60+
  display the contents of a sqlite3 database according to the dates atlass218 4 288 Mar-03-2019, 06:43 AM
Last Post: atlass218
  Python3 and sqlite3 using AND with SELECT darktitan 6 421 Mar-01-2019, 04:33 PM
Last Post: darktitan

Forum Jump:


Users browsing this thread: 1 Guest(s)