Home > database >  Bosses help
Bosses help

Time:01-09

Database tables (d_uarticle) have field content string
& lt; br/>
I'd like to replace



How do you write this statement
How to write is wrong,

CodePudding user response:

A line break?
 
SELECT the REPLACE (content, '& lt; br/> ', '& lt;/p> '+ CHAR (10) +' & lt; p> ') FROM d_uarticle


Control character values
TAB CHAR (9)
Newline CHAR (10)
A carriage return CHAR (13)

CodePudding user response:

Within the string is directly enter:
 UPDATE d_uarticle 
The SET [content]=REPLACE ([content], '& lt; br/> ', '& lt; p>

')

CodePudding user response:

reference 1/f, big watermelon cut a piece of a kilo of reply:
a line break?
 
SELECT the REPLACE (content, '& lt; br/> ', '& lt;/p> '+ CHAR (10) +' & lt; p> ') FROM d_uarticle


Control character values
TAB CHAR (9)
Newline CHAR (10)
A carriage return CHAR (13)



The great spirit run results
:
[SQL] SELECT the REPLACE (content, '& lt; br/> ', '& lt;/p> '+ CHAR (10) +' & lt; p> ') FROM d_uarticle
The affected line: 0
Time: 34.642 s

CodePudding user response:

refer to the second floor of gypsy song response:
string is directly enter inside:
 UPDATE d_uarticle 
The SET [content]=REPLACE ([content], '& lt; br/> ', '& lt; p>

')


This statement is used, displays the
But the actual content did not change,
  • Related