* Mohamed Abd El-Samei Mohamed > Dear all can anyone help me to use NOT IN > > or NOT EXISTS command in mysql ..
None of these are commands... NOT IN was introduced in version 3.21.14a, it is a variant of the IN comparison operator. From the manual: `expr NOT IN (value,...)' Same as `NOT (expr IN (value,...))'. It can be used like this: SELECT * FROM table WHERE field NOT IN ('ended','canceled') This is the same as: SELECT * FROM table WHERE NOT (field IN ('ended','canceled')) NOT EXISTS can be used with the CREATE DATABASE and CREATE TABLE statements. >From the manual: CREATE DATABASE [IF NOT EXISTS] db_name and CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] [table_options] [select_statement] Hope this helps, -- Roger --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php