Colon in placeholder ( example ':Name') usage

Viewed 156

Watching a tutorial on SQLite. It advises two ways to execute insert into and prevent SQL injection attack.

first example in video using "?" as placeholder

object1.execute("INSERT INTO employee VALUES (?,?,?)", (emp1.first, emp1.last, empl.position))

second placeholder example use colon and dictionary

object1.execute("INSERT INTO employee VALUES (:first,:last,:position)", {'first':empl.first, 'second':emp1.last, 'position':empl.position})

I can find the "?" usage as it is well covered but cannot find the " :XXX " usage. Google a few days but cannot find details the nature and the usage of placeholder colon (example ":first"). Is it a SQLite place holder type, or is it related to dictionary, or is it SQL special? Thanks for helping and try to ask if there is any documentation about it.

(sorry for the asking as it could be a beginner level question)

0 Answers
Related