March 11th, 2009

IN with Subselects

Posted by admin in N. Subselects

We use IN to compare one value with a set of values.

If that value is IN the list returned by the subselect, then the WHERE clause returns a true value and the specified columns from the table row being processed are added to the result table.

                    Format:           SELECT select_columns
                                              FROM tables
                                            WHERE value [NOT] IN (subselect);

> Oracle, and SQL Server support IN.

> DB2 supports IN with some variations.

> MySQL, and Postgre SQL do not support IN.

Comments are closed.

Sorry, the comment form is closed at this time.