Полезная информация

next up previous contents index
Next: Using NULL Values Up: Customizing Queries Previous: Customizing Queries

Quotes Inside Text

Suppose you want to insert the name O'Donnell. You may be tempted to enter this in psql as 'O'Donnell', but this will not work. The presence of a single quote inside a single-quoted string generates a parse error. One way to place a single quote inside a single-quoted string is to use two quotes together like this, 'O''Donnell'.6.1 Two single quotes inside a single-quoted string cause one single quote to be generated. Another way is to use a backslash like this, 'O\'Donnell'. The backslash escapes the single quote character.


Bruce Momjian
1999-11-21