使用syntaxhighlighter插件对代码进行加亮:

1>下载syntaxhighlighter,解压后将shThemeDefault.css和shCoreRDark.css文件上传到博客园

2>设置"页首html代码",添加

<link type="text/css" rel="stylesheet" href="http://博客地址/files/wbbice/shCoreRDark.css"/>
<link type="text/css" rel="stylesheet" href="http://博客地址/files/wbbice/shThemeRDark.css"/>

3>引入高亮[注:插入xml代码时需要将"<"替换成"&lt;"]

<div class="likecs_Highlighter">
<pre class="brush:sql;gutter:true;">
自己的代码
</pre>
</div>

4>示例代码:SQL

SELECT 
A.TextData,A.Duration,
A.SPID,
A.ClientProcessID,
A.IntegerData,
A.EventSequence,
B.tablename 
FROM 
  (SELECT 
  event_text,
  TextData,
  CONVERT(DECIMAL(18,2),
  CONVERT(FLOAT,Duration)/1000000) Duration,
  CPU,
  Reads,
  Writes,
  SPID,
  ClientProcessID,
  IntegerData,
  RowCounts,
  EventSequence,
  CONVERT(VARCHAR(12),StartTime,114)StartTime,
  CONVERT(VARCHAR(12),EndTime,114)EndTime,
  HostName,
  ApplicationName,
  ObjectName 
  FROM U9_20160531_0800_1000ms 
  LEFT JOIN int_to_event 
  ON EventClass=event_code WHERE event_text='SP:StmtCompleted')AS A
  LEFT JOIN 20160531_0800_1000ms_usedtables AS B
  ON A.EventSequence=B.eventsequence ;

参考链接:

相关文章:

  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-07-30
  • 2021-11-11
  • 2021-10-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2022-02-15
  • 2022-01-07
相关资源
相似解决方案