Line breaks change to carriage returns when sql is updated
Posted: Mon 30 Nov 2020 11:13
Code execution in delphi
OraQuery1.SQL.Text := 'update t_users set break = ''a'#10'b''';
OraQuery1.ExecSQL;
To query data in Oracle, the characters between a and b are carriage return + line feed, and there are more carriage returns, not just line feeds
sql statement
select ascii(substr(break, 2, 1)), ascii(substr(break, 3, 1)) from t_users
search result
13, 10
OraQuery1.SQL.Text := 'update t_users set break = ''a'#10'b''';
OraQuery1.ExecSQL;
To query data in Oracle, the characters between a and b are carriage return + line feed, and there are more carriage returns, not just line feeds
sql statement
select ascii(substr(break, 2, 1)), ascii(substr(break, 3, 1)) from t_users
search result
13, 10