Update a database

Verified
Added by iNTERFACEWARE

Use conn:execute() to update a database table

Source Code
   -- connect to a SQLite database
   conn = db.connect{
      api = db.SQLITE,
      name = 'test',
      live = true
   }   
      
   -- update data in a database table
   conn:execute('UPDATE Patient SET FirstName = "Fred", WHERE LastName = "Smith")')
Description
Use conn:execute() to update a database table
Usage Details

Use conn:execute() to update a database table. The code connects to a SQLite database, you can substitute with any database connection.

How to use the snippet:

  • Paste the update code into your script