当前位置:网站首页>Oracle advanced (XIV) explanation of escape characters
Oracle advanced (XIV) explanation of escape characters
2022-07-29 10:18:00 【InfoQ】
One 、 Preface
<select id="queryUsrnmTypOprorder" parameterClass="java.util.HashMap"
resultMap="queryCasprjstfsetListMap">
<![CDATA[
select
a.usrnm,
a.typ,
a.oprorder
from fset a
inner join casprjstfapr
using (stfaprid)
where casprjstfapr.jugsumid = #jugsumid#
and casprjstfapr.blnorg = #blnorg#
and isvld = '1'
order by a.typ asc, a.oprorder asc
]]>
</select>
![CDATA[]]![CDATA[]]<<>&
Two 、 Be careful
- There cannot be spaces between escape sequence characters ;
- The escape sequence must be in ”
;” end ;
- Appearing alone ”
&” Will not be considered the beginning of the escape ;
- Case sensitive .

<&![CDATA[]]- This part can no longer contain ”
]]>”;
- Nesting is not allowed ;
- ”
]]>” This part cannot contain spaces or line breaks .
![CDATA[]]3、 ... and 、 Application scenarios and requirements
![CDATA[]]Not in all cases , Escape characters can ;
- For short strings
![CDATA[]]It's wordy , For long string escape characters, the readability is poor ;
![CDATA[]]Express xml Parsers ignore parsing , So faster .
Four 、 Expanding reading DELETE and TRUNCATE The difference between
4.1 grammar
delete from table aa
truncate table aa 4.2 difference
delete fromThe conditions can be written later ,truncateCan not be .
delete fromThe records are deleted one by one , Every deleted record will be entered into the log , andtruncateDelete the whole page at one time , Therefore, only page release is recorded in the solstice , in short,delete fromUpdate log ,truncateBasically not , Less transaction log space is used .
delete fromAfter deleting the empty table , Will keep an empty page ,truncateThere will be no pages left in the table .
- When using row locks to execute
DELETEWhen the sentence is , The rows in the table will be locked for deletion .truncateAlways lock tables and pages , Instead of locking rows .
- If there is
identityThe resulting self accretion id Column ,delete fromAfter that, it still increased from the last number , That is, the seed does not change , andtruncateafter , The seed will return to its original state .
truncateNot triggerdeleteThe trigger of , becausetruncateThe operation does not record the deletion of each line .
4.3 summary
truncateanddeleteDelete data only , Do not delete the structure of the table ( Definition );
dropStatement will delete the constraint that the structure of the table is dependent on (constrain), trigger (trigger), Indexes (index); Stored procedures that depend on the table / The function will keep , But it becameinvalidstate .
deleteThe sentence isdml, This operation will putrollback segementin ,The transaction does not take effect until it is committed; If there is a correspondingtrigger, Execution will be triggered ;truncate,dropyesddl, The operation takes effect immediately , The original data will not be put intorollback segmentin , Cannot be rolled back , Operation does not triggertrigger.
deleteStatement does not affect theextent, High waterline (high watermark) Keep in place ; obviouslydropStatement to free all the space occupied by the table .truncateStatement releases space to by defaultminextentsindividualextent,Unless usedreuse storage;truncateWill reset the high waterline ( Go back to the beginning ).
- Speed , Generally speaking :
drop> truncate > delete.
- Security : Careful use
dropandtruncate, Especially when there is no backup , Otherwise, it's too late to cry .
- On use , Want to delete some data lines
delete, Pay attention to takewhereClause . The rollback segment should be large enough ; Want to delete table . Of course withdrop; Want to keep the table and delete all the data . If it's not about business , usetruncatethat will do . If it's about business , Or want to triggertrigger, Or use itdelete; If it's defragmenting the table , It can be usedtruncatekeep pace withreuse stroage, Re import / insert data .
边栏推荐
- 函数——(C游记)
- How to integrate Google APIs with Google's application system (3) -- call the restful service of Google discovery API
- [dark horse morning post] Youxian responded to the dissolution every day, and many places have been unable to place orders; Li Bin said that Wei Lai will produce a mobile phone every year; Li Ka Shing
- Orbslam2 installation test and summary of various problems
- shell编程之sed,正则表达式
- Are you familiar with the redis cluster principle of high paid programmers & interview questions series 122? How to ensure the high availability of redis (Part 2): cluster mechanism and principle, clu
- CS assurance and research experience in 2021 (IV): pre promotion and exemption of Xijiao soft Research Institute and the third room of Information Technology Institute
- The function of that sentence
- Follow teacher Tian to learn practical English Grammar (continuous update)
- [fortran]vscode configure FORTRAN to run Hello World
猜你喜欢

Vector implementation

ECCV 2022 | CMU提出在视觉Transformer上进行递归,不增参数,计算量还少

remap_ Use of table in impdp

跟着田老师学实用英语语法(持续更新)

After eating Alibaba's core notes of highly concurrent programming, the backhand rose 5K

MySQL 8 of relational database -- deepening and comprehensive learning from the inside out

MySQL optimization theory study guide
![[jetson][转载]jetson上安装pycharm](/img/65/ba7f1e7bd1b39cd67018e3f17d465b.png)
[jetson][转载]jetson上安装pycharm

ECCV 2022 | CMU proposes to recurse on the visual transformer without adding parameters, and the amount of calculation is still small

Only simple function test? One article takes you to advanced interface automatic testing technology in 6 steps
随机推荐
My problem solving record 1: the @component annotation is used on the class. If you want to use the methods in this class, you can't directly new, but should use @autowired for injection, otherwise an
[ts]Typescript学习记录坑点合集
MySQL infrastructure: SQL query statement execution process
[HFCTF 2021 Final]easyflask
Where are those test / development programmers in their 30s? a man should be independent at the age of thirty......
shell编程之sed,正则表达式
Skiasharp's WPF self drawn bouncing ball (case version)
PDF处理还收费?不可能
Harmonyos 3.0 release!
Functions and arrays
TCP failure model
Are you familiar with the redis cluster principle of high paid programmers & interview questions series 122? How to ensure the high availability of redis (Part 2): cluster mechanism and principle, clu
A Zuo's realm
Print out the "hourglass" and the remaining number according to the given number of characters and characters
[ts]typescript learning record pit collection
CS assurance and research experience in 2021 (IV): pre promotion and exemption of Xijiao soft Research Institute and the third room of Information Technology Institute
Linear regression of machine learning (least square handwriting +sklearn Implementation)
"Focus on machines": Zhu Songchun's team built a two-way value alignment system between people and robots to solve major challenges in the field of human-computer cooperation
Read Plato farm's eplato and the reason for its high premium
[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types