Re: "'" in SQL INSERT statement

Поиск
Список
Период
Сортировка
От Brett W. McCoy
Тема Re: "'" in SQL INSERT statement
Дата
Msg-id Pine.LNX.4.30.0101250547420.10432-100000@chapelperilous.net
обсуждение исходный текст
Ответ на "'" in SQL INSERT statement  (Markus Wagner <wagner@imsd.uni-mainz.de>)
Список pgsql-sql
On Thu, 25 Jan 2001, Markus Wagner wrote:

> I have some data that I wish to transfer into a database using perl/DBI.
> Some of the data are strings containing the apostrophe "'" which I use
> as string delimiter.
>
> How can I put these into my database using the INSERT statement?

You will need to escape them with the \ character.  So "Bill's Garage"
will become "Bill\'s Garage".

-- Brett                                    http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Romeo wasn't bilked in a day.    -- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With Pogo"



В списке pgsql-sql по дате отправления:

Предыдущее
От: Alessio Bragadini
Дата:
Сообщение: Re: "'" in SQL INSERT statement
Следующее
От: Roberto Bertolusso
Дата:
Сообщение: Cannot CREATE INDEX that contains a function