0

I need to be able to do something like this in DBVisualizer:

WHERE Column = {12, 23, 55, 33, 22}

Instead, I am doing this

WHERE Column = 12 OR Column = 23 OR Column = 55 OR Column = 33 OR Column = 22

Is there some sort of syntax reserved for this purpose? The latter is very tedious, and I am not a database person. So any help is very much appreciated!

4

1 回答 1

0
WHERE Column in (12,23,55,33,22)

请注意,这种语言不是 dbvisualizer 的功能,而是您要连接的数据库的功能。上面的代码适用于我曾经使用过的每个 RDBMS。 http://www.w3schools.com/sql/sql_in.asp

我认为这需要 SQL 标记!

于 2011-02-14T20:59:30.947 回答