Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: make first query example use GString

...

Code Block
firstName = "yue"
lastName = "O'shea"
sql.execute("insert into people (firstName, lastName) values (${firstName}, ${lastName})")

Because the sql statements statement is expressed in a GString, the values firstName and lastName are provided as parameters and so the quote mark in lastName will not be seen as part of the statement.

...