----- Original Message ----- From: "Ronan Lucio" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 25, 2004 5:12 PM Subject: Query Help
> Hi, > > I sorry for I neither didnīt find the information that I need in > the documentation nor found the correct words for a search > in the mailing archivers. > > I have a query like this: > > SELECT cod, descr > FROM table > WHERE AND cod != 7 The 'AND' in the previous line should not be there. > AND cod != 10 > AND cod != 13 > AND cod != 14 > AND cod != 15 > AND cod != 20 > AND cod != 25 > AND cod != 30 > AND cod != 31 > ORDER BY descr > > Is there a SQL command to make this query cleaner? > > I find something like: > WHERE cod NOT IN (7,10,13,14,15,20,25,30,31) > That's right; that is a much cleaner way to write the query. Rhino -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]