...

Database Managment - MySql

Back to Course

Lesson Description


Lession - #1317 SQL In


The IN operator allows you to determine multiple values in a WHERE condition. The IN operator is a shorthand for multiple OR conditions.

Syntax



SELECT column_name(s>
FROM table_name WHERE column_name IN (value1, value2, ...>
; or: SELECT column_name(s>
FROM table_name WHERE column_name IN (SELECT STATEMENT>
;


Let's see an example



SELECT * FROM EMPLOYEE
WHERE dept IN ('Accounting'>
; SELECT * FROM EMPLOYEE WHERE dept NOT IN ('Accounting'>
;

Output


Try it here
mysql online compiler mysql online MySQL Python Connector is a Python driver that assists with coordinating Python and MySQL mysql practice online mysql editor .
Might I at any point utilize MySQL with Python? Python needs a MySQL driver to get to the MySQL data set. In this instructional exercise we will utilize the driver "MySQL Connector". We prescribe that you use PIP to introduce "MySQL Connector". PIP is probably currently introduced in your Python climate.mysql connector python