In Oracle, in is often used in where conditional expressions. It can operate on data whose field values meet the specified range. The syntax is "select * from table name where field in (value1, value2,… );".
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
in is often used in conditional expressions (where). Its function is to operate, query or delete data within a certain range. The field value only needs to meet any one within this range
Query
select * from TableName(表名) where 字段 in (value1,value2,…); select * from TableName(表名) where 字段 not in (value1,value2,…); select 字段1,字段2,… from 表名 where 字段 in/not in (value1,value2,…);
Delete
delete from 表名 where 字段 in/not in (value1,value2,…);
Usage example:
in is used to query records
## Query all records in the t_hero table# ##Query all records whose keyid is equal to one of the three values (21, 16, 7), as long as these three values are met One of the three can be queried.
Delete the two records with keyid = (14,15)
Recommended tutorial: "
Oracle tutorialThe above is the detailed content of What is the usage of in in oracle. For more information, please follow other related articles on the PHP Chinese website!