-
Notifications
You must be signed in to change notification settings - Fork 5
/
diffSQLs.html
109 lines (102 loc) · 21.8 KB
/
diffSQLs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
table.diff {font-family:Courier; border:medium;}
.diff_header {background-color:#e0e0e0}
td.diff_header {text-align:right}
.diff_next {background-color:#c0c0c0}
.diff_add {background-color:#aaffaa}
.diff_chg {background-color:#ffff77}
.diff_sub {background-color:#ffaaaa}
</style>
</head>
<body>
<table class="diff" id="difflib_chg_to0__top"
cellspacing="0" cellpadding="0" rules="groups" >
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
<tbody>
<tr><td class="diff_next" id="difflib_chg_to0__1"><a href="#difflib_chg_to0__0">f</a></td><td class="diff_header" id="from0_1">1</td><td nowrap="nowrap"></td><td class="diff_next"><a href="#difflib_chg_to0__0">f</a></td><td class="diff_header" id="to0_1">1</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_2">2</td><td nowrap="nowrap">-- TEST CREATE TABLE</td><td class="diff_next"></td><td class="diff_header" id="to0_2">2</td><td nowrap="nowrap">-- TEST CREATE TABLE</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__1">n</a></td><td class="diff_header" id="from0_3">3</td><td nowrap="nowrap"><span class="diff_sub">CREATE TABLE TEST02</span></td><td class="diff_next"><a href="#difflib_chg_to0__1">n</a></td><td class="diff_header" id="to0_3">3</td><td nowrap="nowrap"><span class="diff_add">CREATE TABLE T_TEST02/*IPS_SQLCHECK:NO COMMENT*/</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_4">4</td><td nowrap="nowrap"><span class="diff_sub">( SN_KEY INT,</span></td><td class="diff_next"></td><td class="diff_header" id="to0_4">4</td><td nowrap="nowrap"><span class="diff_add">( SN_KEY INT/*IPS_SQLCHECK:NO COMMENT*/,</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_5">5</td><td nowrap="nowrap"> SN VARCHAR(20) COMMENT 'CMT COL SN',</td><td class="diff_next"></td><td class="diff_header" id="to0_5">5</td><td nowrap="nowrap"> SN VARCHAR(20) COMMENT 'CMT COL SN',</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__2">n</a></td><td class="diff_header" id="from0_6">6</td><td nowrap="nowrap"><span class="diff_sub"> PN VARCHAR(20),</span></td><td class="diff_next"><a href="#difflib_chg_to0__2">n</a></td><td class="diff_header" id="to0_6">6</td><td nowrap="nowrap"><span class="diff_add"> PN VARCHAR(20)/*IPS_SQLCHECK:NO COMMENT*/,</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_7">7</td><td nowrap="nowrap"><span class="diff_sub"> MD VARCHAR(20),</span></td><td class="diff_next"></td><td class="diff_header" id="to0_7">7</td><td nowrap="nowrap"><span class="diff_add"> MD VARCHAR(20)/*IPS_SQLCHECK:NO COMMENT*/,</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_8">8</td><td nowrap="nowrap"><span class="diff_sub"> DESCP VARCHAR(20),</span></td><td class="diff_next"></td><td class="diff_header" id="to0_8">8</td><td nowrap="nowrap"><span class="diff_add"> DESCP VARCHAR(20)/*IPS_SQLCHECK:NO COMMENT*/,</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_9">9</td><td nowrap="nowrap"><span class="diff_sub"> INDEX (SN),</span></td><td class="diff_next"></td><td class="diff_header" id="to0_9">9</td><td nowrap="nowrap"><span class="diff_add"> INDEX IDX_TEST02_SN (SN),</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_10">10</td><td nowrap="nowrap"><span class="diff_sub"> KEY (PN),</span></td><td class="diff_next"></td><td class="diff_header" id="to0_10">10</td><td nowrap="nowrap"><span class="diff_add"> KEY IDX_TEST02_PN (PN),</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_11">11</td><td nowrap="nowrap"> CONSTRAINT UNIQUE KEY(MD) </td><td class="diff_next"></td><td class="diff_header" id="to0_11">11</td><td nowrap="nowrap"> CONSTRAINT UNIQUE KEY<span class="diff_add"> UK_TEST02_MD </span>(MD) </td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_12">12</td><td nowrap="nowrap">);</td><td class="diff_next"></td><td class="diff_header" id="to0_12">12</td><td nowrap="nowrap">);</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_13">13</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_13">13</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_14">14</td><td nowrap="nowrap">-- TEST ERROR SYNTAX</td><td class="diff_next"></td><td class="diff_header" id="to0_14">14</td><td nowrap="nowrap">-- TEST ERROR SYNTAX</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_15">15</td><td nowrap="nowrap">CREATE TABLE TEST03</td><td class="diff_next"></td><td class="diff_header" id="to0_15">15</td><td nowrap="nowrap">CREATE TABLE TEST03</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_16">16</td><td nowrap="nowrap">( SN_KEY INT,</td><td class="diff_next"></td><td class="diff_header" id="to0_16">16</td><td nowrap="nowrap">( SN_KEY INT,</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_17">17</td><td nowrap="nowrap"> SN VARCHAR(20),</td><td class="diff_next"></td><td class="diff_header" id="to0_17">17</td><td nowrap="nowrap"> SN VARCHAR(20),</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_18">18</td><td nowrap="nowrap"> PN VARCHAR(20) COMMENT 'COL PN',</td><td class="diff_next"></td><td class="diff_header" id="to0_18">18</td><td nowrap="nowrap"> PN VARCHAR(20) COMMENT 'COL PN',</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__2"></td><td class="diff_header" id="from0_19">19</td><td nowrap="nowrap"> MD VARCHAR(20),</td><td class="diff_next"></td><td class="diff_header" id="to0_19">19</td><td nowrap="nowrap"> MD VARCHAR(20),</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_20">20</td><td nowrap="nowrap"> DESCP VARCHAR(20),</td><td class="diff_next"></td><td class="diff_header" id="to0_20">20</td><td nowrap="nowrap"> DESCP VARCHAR(20),</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__3"></td><td class="diff_header" id="from0_21">21</td><td nowrap="nowrap">);</td><td class="diff_next"></td><td class="diff_header" id="to0_21">21</td><td nowrap="nowrap">);</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_22">22</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_22">22</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_23">23</td><td nowrap="nowrap">-- TEST PARTITION TABLE </td><td class="diff_next"></td><td class="diff_header" id="to0_23">23</td><td nowrap="nowrap">-- TEST PARTITION TABLE </td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__4"><a href="#difflib_chg_to0__3">n</a></td><td class="diff_header" id="from0_24">24</td><td nowrap="nowrap"><span class="diff_sub">CREATE TABLE TABLE01 (</span></td><td class="diff_next"><a href="#difflib_chg_to0__3">n</a></td><td class="diff_header" id="to0_24">24</td><td nowrap="nowrap"><span class="diff_add">CREATE TABLE T_TABLE01/*IPS_SQLCHECK:NO COMMENT*/ (</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_25">25</td><td nowrap="nowrap"> id INT PRIMARY KEY COMMENT 'PK',</td><td class="diff_next"></td><td class="diff_header" id="to0_25">25</td><td nowrap="nowrap"> id INT PRIMARY KEY COMMENT 'PK',</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__4">n</a></td><td class="diff_header" id="from0_26">26</td><td nowrap="nowrap"><span class="diff_sub"> year_col INT</span></td><td class="diff_next"><a href="#difflib_chg_to0__4">n</a></td><td class="diff_header" id="to0_26">26</td><td nowrap="nowrap"><span class="diff_add"> YEAR_COL INT/*IPS_SQLCHECK:NO COMMENT*/</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_27">27</td><td nowrap="nowrap">)</td><td class="diff_next"></td><td class="diff_header" id="to0_27">27</td><td nowrap="nowrap">)</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_28">28</td><td nowrap="nowrap">PARTITION BY RANGE (year_col) (</td><td class="diff_next"></td><td class="diff_header" id="to0_28">28</td><td nowrap="nowrap">PARTITION BY RANGE (year_col) (</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__5">n</a></td><td class="diff_header" id="from0_29">29</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">p</span>0 VALUES LESS THAN (1991),</td><td class="diff_next"><a href="#difflib_chg_to0__5">n</a></td><td class="diff_header" id="to0_29">29</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">PT_</span>0 VALUES LESS THAN (1991),</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_30">30</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">p</span>1 VALUES LESS THAN (1995),</td><td class="diff_next"></td><td class="diff_header" id="to0_30">30</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">PT_</span>1 VALUES LESS THAN (1995),</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__5"></td><td class="diff_header" id="from0_31">31</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">p</span>2 VALUES LESS THAN (1999),</td><td class="diff_next"></td><td class="diff_header" id="to0_31">31</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">PT_</span>2 VALUES LESS THAN (1999),</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_32">32</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">p</span>3 VALUES LESS THAN (2003)</td><td class="diff_next"></td><td class="diff_header" id="to0_32">32</td><td nowrap="nowrap"> PARTITION <span class="diff_chg">PT_</span>3 VALUES LESS THAN (2003)</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__6"></td><td class="diff_header" id="from0_33">33</td><td nowrap="nowrap">);</td><td class="diff_next"></td><td class="diff_header" id="to0_33">33</td><td nowrap="nowrap">);</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_34">34</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_34">34</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__7"></td><td class="diff_header" id="from0_35">35</td><td nowrap="nowrap">-- TEST ADD COLUMNS</td><td class="diff_next"></td><td class="diff_header" id="to0_35">35</td><td nowrap="nowrap">-- TEST ADD COLUMNS</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__6">n</a></td><td class="diff_header" id="from0_36">36</td><td nowrap="nowrap"><span class="diff_sub">ALTER TABLE t1 ADD COLUMN (c2 INT,C3 VARCHAR(10));</span></td><td class="diff_next"><a href="#difflib_chg_to0__6">n</a></td><td class="diff_header" id="to0_36">36</td><td nowrap="nowrap"><span class="diff_add">ALTER TABLE t1 ADD COLUMN (C2 INT/*IPS_SQLCHECK:NO COMMENT*/,C3 VARCHAR(10)/*IPS_SQLCHECK:NO COMMENT*/),ALGORITHM=INPLACE,LOCK=NONE;</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_37">37</td><td nowrap="nowrap">-- 测试增加partition</td><td class="diff_next"></td><td class="diff_header" id="to0_37">37</td><td nowrap="nowrap">-- 测试增加partition</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__7">n</a></td><td class="diff_header" id="from0_38">38</td><td nowrap="nowrap">ALTER TABLE t1 ADD PARTITION (PARTITION <span class="diff_chg">p</span>3 VALUES LESS THAN (2002));</td><td class="diff_next"><a href="#difflib_chg_to0__7">n</a></td><td class="diff_header" id="to0_38">38</td><td nowrap="nowrap">ALTER TABLE t1 ADD PARTITION (PARTITION <span class="diff_chg">PT_</span>3 VALUES LESS THAN (2002))<span class="diff_add">,ALGORITHM=INPLACE,LOCK=NONE</span>;</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_39">39</td><td nowrap="nowrap">-- 测试索引和约束</td><td class="diff_next"></td><td class="diff_header" id="to0_39">39</td><td nowrap="nowrap">-- 测试索引和约束</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__8">n</a></td><td class="diff_header" id="from0_40">40</td><td nowrap="nowrap"><span class="diff_sub">ALTER TABLE t2 ADD INDEX (d), ADD UNIQUE (a);</span></td><td class="diff_next"><a href="#difflib_chg_to0__8">n</a></td><td class="diff_header" id="to0_40">40</td><td nowrap="nowrap"><span class="diff_add">ALTER TABLE t2 ADD INDEX IDX_T2_D (d), ADD UNIQUE UK_T2_A (a),ALGORITHM=INPLACE,LOCK=NONE;</span></td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__8"></td><td class="diff_header" id="from0_41">41</td><td nowrap="nowrap"><span class="diff_sub">ALTER TABLE TEST13 ADD FOREIGN KEY(C_10) REFERENCES TEST02(SN_KEY);</span></td><td class="diff_next"></td><td class="diff_header" id="to0_41">41</td><td nowrap="nowrap"><span class="diff_add">ALTER TABLE TEST13 ADD CONSTRAINT FK_TEST13_C_10 FOREIGN KEY(C_10) REFERENCES TEST02(SN_KEY),ALGORITHM=INPLACE,LOCK=NONE;</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_42">42</td><td nowrap="nowrap"><span class="diff_sub">ALTER TABLE TEST13 ADD UNIQUE INDEX(C);</span></td><td class="diff_next"></td><td class="diff_header" id="to0_42">42</td><td nowrap="nowrap"><span class="diff_add">ALTER TABLE TEST13 ADD UNIQUE INDEX UK_TEST13_C (C),ALGORITHM=INPLACE,LOCK=NONE;</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_43">43</td><td nowrap="nowrap"><span class="diff_sub">ALTER TABLE TEST13 add PRIMARY KEY(A);</span></td><td class="diff_next"></td><td class="diff_header" id="to0_43">43</td><td nowrap="nowrap"><span class="diff_add">ALTER TABLE TEST13 add PRIMARY KEY(A),ALGORITHM=INPLACE,LOCK=NONE;</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_44">44</td><td nowrap="nowrap">-- 测试创建proc function</td><td class="diff_next"></td><td class="diff_header" id="to0_44">44</td><td nowrap="nowrap">-- 测试创建proc function</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_45">45</td><td nowrap="nowrap">delimiter //</td><td class="diff_next"></td><td class="diff_header" id="to0_45">45</td><td nowrap="nowrap">delimiter //</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__9">n</a></td><td class="diff_header" id="from0_46">46</td><td nowrap="nowrap"><span class="diff_sub">CREATE PROCEDURE simpleproc (OUT param1 INT)</span></td><td class="diff_next"><a href="#difflib_chg_to0__9">n</a></td><td class="diff_header" id="to0_46">46</td><td nowrap="nowrap"><span class="diff_add">CREATE PROCEDURE SP_SIMPLEPROC (OUT param1 INT)</span></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_47">47</td><td nowrap="nowrap">BEGIN</td><td class="diff_next"></td><td class="diff_header" id="to0_47">47</td><td nowrap="nowrap">BEGIN</td></tr>
<tr><td class="diff_next" id="difflib_chg_to0__9"></td><td class="diff_header" id="from0_48">48</td><td nowrap="nowrap"> SELECT COUNT(*) INTO param1 FROM t;</td><td class="diff_next"></td><td class="diff_header" id="to0_48">48</td><td nowrap="nowrap"> SELECT COUNT(*) INTO param1 FROM t;</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_49">49</td><td nowrap="nowrap">END;//</td><td class="diff_next"></td><td class="diff_header" id="to0_49">49</td><td nowrap="nowrap">END;//</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_50">50</td><td nowrap="nowrap">delimiter ;</td><td class="diff_next"></td><td class="diff_header" id="to0_50">50</td><td nowrap="nowrap">delimiter ;</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_51">51</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to0_51">51</td><td nowrap="nowrap"></td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_52">52</td><td nowrap="nowrap">delimiter $$</td><td class="diff_next"></td><td class="diff_header" id="to0_52">52</td><td nowrap="nowrap">delimiter $$</td></tr>
<tr><td class="diff_next"><a href="#difflib_chg_to0__top">t</a></td><td class="diff_header" id="from0_53">53</td><td nowrap="nowrap">CREATE FUNCTION `SHORTEN`(S VARCHAR(255), N INT)</td><td class="diff_next"><a href="#difflib_chg_to0__top">t</a></td><td class="diff_header" id="to0_53">53</td><td nowrap="nowrap">CREATE FUNCTION `<span class="diff_add">F_</span>SHORTEN`(S VARCHAR(255), N INT)</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_54">54</td><td nowrap="nowrap"> RETURNS varchar(255)</td><td class="diff_next"></td><td class="diff_header" id="to0_54">54</td><td nowrap="nowrap"> RETURNS varchar(255)</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_55">55</td><td nowrap="nowrap">BEGIN</td><td class="diff_next"></td><td class="diff_header" id="to0_55">55</td><td nowrap="nowrap">BEGIN</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_56">56</td><td nowrap="nowrap"> IF ISNULL(S) THEN</td><td class="diff_next"></td><td class="diff_header" id="to0_56">56</td><td nowrap="nowrap"> IF ISNULL(S) THEN</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_57">57</td><td nowrap="nowrap"> RETURN '';</td><td class="diff_next"></td><td class="diff_header" id="to0_57">57</td><td nowrap="nowrap"> RETURN '';</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_58">58</td><td nowrap="nowrap"> END IF;</td><td class="diff_next"></td><td class="diff_header" id="to0_58">58</td><td nowrap="nowrap"> END IF;</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_59">59</td><td nowrap="nowrap">END;$$</td><td class="diff_next"></td><td class="diff_header" id="to0_59">59</td><td nowrap="nowrap">END;$$</td></tr>
<tr><td class="diff_next"></td><td class="diff_header" id="from0_60">60</td><td nowrap="nowrap">delimiter ;</td><td class="diff_next"></td><td class="diff_header" id="to0_60">60</td><td nowrap="nowrap">delimiter ;</td></tr>
</tbody>
</table>
<table class="diff" summary="Legends">
<tr> <th colspan="2"> Legends </th> </tr>
<tr> <td> <table border="" summary="Colors">
<tr><th> Colors </th> </tr>
<tr><td class="diff_add"> Added </td></tr>
<tr><td class="diff_chg">Changed</td> </tr>
<tr><td class="diff_sub">Deleted</td> </tr>
</table></td>
<td> <table border="" summary="Links">
<tr><th colspan="2"> Links </th> </tr>
<tr><td>(f)irst change</td> </tr>
<tr><td>(n)ext change</td> </tr>
<tr><td>(t)op</td> </tr>
</table></td> </tr>
</table>
</body>
</html>