12. SQL Basic collation (operator and priority)

Source: Internet
Author: User

Operator

+ - * / %( take surplus) , assignment operator =

DECLARE @jia int

Set @jia =

Print @jia

DECLARE @jia int

Set @jia = 10%3

Print @jia

comparison Operators >, <, >=, <=,<> ( not equals ),! =,!<,!>

? the logical operator and , or, all (conditions are all satisfied ) , any (one condition satisfies ), between ( Range ), in ( any one condition satisfies ), like, not ( non ), some ( any one condition satisfies ), exists ( sub-query )

*all (modifier, which represents all the column element data to satisfy the subquery, used with the comparison operator)

Not can be used in conjunction with In,like to indicate that it is not in a range, or unlike a certain wildcard value

Priority level:

*%/

positive or negative + - 

Comparison operators

Not and or between

All, a, some, in, like, exists =

Unary operator: " + , - "represents the positive or negative of the number, the negative sign is best used when parentheses, otherwise easily as a minus action

12. SQL Basic collation (operator and priority)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.