MSSQL-Part4: How to use AND, OR and NOT Operators in SQL?

Опубликовано: 28 Сентябрь 2024
на канале: Codenbox AutomationLab
74
4

#learnsql #mssql #sql
+How to use AND in SQL?
+ How to use OR Operators in SQL?
+How to use NOT Operators in SQL?
▬▬▬▬▬▬ In this Video ▶️ ▬▬▬▬▬▬
The WHERE clause can be combined with AND, OR, and NOT operators. The AND and OR operators are used to filter records based on more than one condition:
• The AND operator displays a record if all the conditions separated by AND are TRUE.
• The OR operator displays a record if any of the conditions separated by OR is TRUE.
• The NOT operator displays all the records except the NOT condition

AND Syntax: SELECT column1, column2, ...
FROM table_name
WHERE condition1 AND condition2 AND condition3 ...;

OR Syntax: SELECT column1, column2, ...
FROM table_name
WHERE condition1 OR condition2 OR condition3 ...;

NOT Syntax: SELECT column1, column2, ...
FROM table_name
WHERE NOT condition;

▬▬▬▬▬▬ Useful Links 🛠 ▬▬▬▬▬▬
Blog ► http://codenboxautomationlab.com/​​​
GitHub Repo ► https://github.com/codenbox​​


▬▬▬▬▬▬ Connect with us 👋 ▬▬▬▬▬▬
~~~Subscribe to this channel, and press bell icon to get all updated videos on Selenium and Cypress Automation:    / codenboxautomationlab  

~~~ Follow us on Facebook & Twitter to get more updates:
►  / ​​​  
►  / codenboxteam