An annotation is an explanation or description of the code;
Operators are important components of the Transact-SQL language, and common operators include arithmetic operators, assignment operators, comparison operators, logical operators, and so on.
Wildcard characters are%, _ (underscore), [], [^].
Annotation characters
In Transact-SQL, you can use two types of comment characters:
- An ANSI standard annotation (--) for single-line comments, such as those added by the following SQL statement
Use -- Open Data Table
The same program annotation symbol as the C language, i.e. "/*", "*/"
The shortcut key to annotate the selected row at once is CTRL + Shift +c; the shortcut key for canceling multiple lines of comment at once is CTRL + Shift +r.
Comparison operators
>,<,=,>=,<=,<>.
The result of the comparison operator is a Boolean data type with True,false and UNKNOW3 values.
logical operators
Logical operators, like comparison operators, return Boolean data types with a value of true or False
Operators are:all,and,any,between,exists,in,like,not,or,some
Bitwise operators
The operand of a bitwise operator can be an integer type or a binary data type
Operator:&,|,^ (bitwise mutex), ~
Join operators
+
Wildcard characters
Matches any single character in the specified range or within the set specified by the square brackets.
Wildcard |
Description |
Example |
% |
Any character that contains 0 or more characters |
"loving%" can be said: "Loving", "Loving You", "Loving?" ” |
_ (Underline) |
Any single character |
"Loving_" can be said: "LOVINGC". followed by only one character |
[] |
Any single character in the specified range ([a~f]) or collection ([abcdef]) |
[0~9]123 denotes a character starting with any character between 0~9 and ending with ' 123 ' |
[^] |
Any single character that does not belong to the specified range ([a~f]) or collection ([abcdef]) |
[^0~5]123 means a character that does not start with any one character between 0~5, but ends with "123" |
SQL comment, operator, and wildcard characters