Skip to content Skip to sidebar Skip to footer

Correctly Delimit Single Quotes In Postgres Insert/update

I'm having a hard time figuring out how to delimit any single quotes in a text field in a postgreSQL UPDATE statement. If I consider the following, replacing ' with '' as seems to

Solution 1:

You should not escape SQL special characters manually.

Your second example is right. Using prepared/parametrized statements eliminates SQL injection threat.

Post a Comment for "Correctly Delimit Single Quotes In Postgres Insert/update"