Postgresql 문자열을 삽입

코드 예제

0
0

postgresql 문자열을 삽입

# When I used Python to insert values into PostgreSQL, I also met the question: column "xxx" does not exist.
# The I find the reason in wiki.postgresql:
# PostgreSQL uses only single quotes for this (i.e. WHERE name = 'John'). Double quotes are used to quote system identifiers; field names, table names, etc. (i.e. WHERE "last name" = 'Smith').
# MySQL uses ` (accent mark or backtick) to quote system identifiers, which is decidedly non-standard.
# It means PostgreSQL can use only single quote for field names, table names, etc. So you can not use single quote in value.
# My situation is: I want to insert values "the difference of it’s adj for sb and it's adj of sb" into PostgreSQL.
# How I figure out this problem:
#I replace ' with ’, and I replace " with '. Because PostgreSQL value does not support double quote.
insert into test values (1,'user’s log');
insert into test values (2,'my users');
insert into test values (3,'customer’s');

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................