File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # T-SQL Diff
2+ Compare Difference In T-SQL Queries at Runtime
3+
4+ ## Install
5+ 1 . Go to [ release] ( https://github.com/llouislu/tsql-diff/releases ) and download the latest version.
6+ 2 . execute install.sql in your target database.
7+
8+ ## Uninstall
9+ Execute this stored procedure.
10+ ```
11+ EXEC Diff.Uninstall;
12+ ```
13+
14+ ## Usage
15+ Please refer to the doc/examples while reading this section.
16+
17+ There is a ` Diff ` schema in your target database after you successfully installed this library.
18+
19+ ### Compare two queries in strings
20+ ``` sql
21+ DECLARE @status_code INT ;
22+ EXEC @status_code = Diff .CompareString ' Select 1' , ' Select 2' ;
23+ ```
24+
25+ ### Compare two queries in files
26+ ``` sql
27+ DECLARE @status_code INT ;
28+ EXEC @status_code = Diff .Compare ' path/to/query1.sql' , ' path/to/query2.sql' ;
29+ ```
30+
31+ ### Compare paris of queries in a folder
32+ ``` sql
33+ declare @status_code INT ;
34+ exec Diff .ComapreFolder @FolderPath= ' /root/data/t' , @ModifierName= ' Model'
35+ ```
You can’t perform that action at this time.
0 commit comments