Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql insert string

# 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');
Comment

PREVIOUS NEXT
Code Example
Sql :: how to convert exponential expression to n decimal float in postgresql 
Sql :: What are the advantages of MySQL when compared with Oracle? 
Sql :: oracle dbms scheduler repeat interval every 5 minutes 
Sql :: radius search with point data in mysql 
Sql :: QUERY JPQL 
Sql :: how to get employee having maximum experience in mysql 
Sql :: Stack conditions in CASE statement in PL/SQL 
Sql :: get all jobs if salary more than 5500 less than 10000 sql 
Sql :: how to count with except in psql 
Sql :: postgres automatic partioning a table 
Sql :: oracle apex run 404 
Sql :: TSQL Code Snippet For Optimized Sales Query 
Sql :: sql examples from your work 
Sql :: mysql get last character of string 
Sql :: Using Set<Id in Dynamic SOQL 
Sql :: create darabase in sql 
Sql :: sqlcl format 
Sql :: hoq to import database source 
Sql :: decalre table in sql 
Sql :: function sum(text) does not exist postgres 
Sql :: Sql select by content lenght 
Sql :: mysql get nested records 
Sql :: oracle APEX elapsed time 
Sql :: How Much Space is PL/Scope Data Using? 
Sql :: sql server agent not running 
Sql :: ring rollback updates to the database using the odbc_rollback() 
Sql :: pl sql constraint user function 
Sql :: how to connect pgadmin with excel 
Sql :: stored procedure replace 
Sql :: provide hardcoded value in the mysql query 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =