You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to insert " and ' in one sentence of sql at the same time? #3774
We know that single quotation marks (') can be inserted in double quotation marks, and double quotation marks (") can be inserted in single quotation marks. However, if an indicator has both single quotation marks (') and double quotation marks (") in the same time, how to insert it?
I can Use:
insert into root.ln.wf01.wt01 (timestamp,asd) values(now()," ' ");
To add a single quote record, I can also use:
insert into root.ln.wf01.wt01 (timestamp,asd) values(now(),' " ');
To add a double quote record, but I can’t add a record with both single quotes and double quotes, because there is no escape mechanism;
Activity
Alima777 commentedon Aug 19, 2021
Can you give one example?
limeng32 commentedon Aug 19, 2021
I can Use:
insert into root.ln.wf01.wt01 (timestamp,asd) values(now()," ' ");
To add a single quote record, I can also use:
insert into root.ln.wf01.wt01 (timestamp,asd) values(now(),' " ');
To add a double quote record, but I can’t add a record with both single quotes and double quotes, because there is no escape mechanism;