Skip to content
  • 0 Votes
    2 Posts
    1k Views
    purpleleopard770P
    SQL SERVER – How to insert a string value with an apostrophe (single quote) in a column Step 1 : Create a sample table. USE tempdb. Step 2 : Insert the name with apostrophe. Step 3 : Just replace the single apostrophe with double apostrophe and insert the record again. Step 4 : Lets check if the data is inserted or not. Additionally, how do I escape a special character in PostgreSQL? Within an escape string, a backslash character () begins a C-like backslash escape sequence, in which the combination of backslash and following character(s) represents a special byte value. is a backspace, f is a form feed, is a newline, is a carriage return, is a tab. Also, how do you escape double quotes in Postgres? SELECT REPLACE(text, , E) FROM aTable WHERE Youll need to escape your escape character to get a literal backslash (hence the doubled backslash) and use the E prefix on the replacement string to get the right escape syntax. How do you insert a double quote in SQL query? Any character can be part of a string so in order to insert a double quote into a table you need to enclose it within single quotes. insert into users (id, name, username) values (null, tes, hello);