Re: Same question, better example

2006-02-20 Thread Mark Leith
in the example. Best regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysql on Windows

2006-03-14 Thread Mark Leith
Hi Neil, Neil Tompkins wrote: Is anyone running mySQL on Windows 2003 server platform. Are there any known problems ? There is a known bug for Windows 2003 - bug #12071: http://bugs.mysql.com/bug.php?id=12071 You should use 4.0.19 or 5.0.19. Best regards Mark -- Mark Leith, Support

Re: Accountability with MySQL

2006-03-16 Thread Mark Leith
problem (when weighing them against extra costs, in both space and speed). If you can get away with not using NULL as well, then great. This argurment will, however, carry on between academia and the real world for at least the next 4000 years. :) Best regards Mark -- Mark Leith, Support Engineer

Re: Please help: recovering db from crash

2006-03-21 Thread Mark Leith
of the Essentials package. I tried to install a similar setup on another server, then copy the data\ folder over. The MySQL service starts, but I am not able to login, even as root. Is there anyone who can advise me on the recovery steps? Appreciate your feedback! -- Mark Leith, Support

Re: innodb in 4.1.18

2006-03-22 Thread Mark Leith
tables between machines you need: o All ib data files o All ib logfiles o All related database directories and frm files o Your my.cnf/ini http://dev.mysql.com/doc/refman/5.0/en/innodb-backup.html Regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Mark Leith
comfortable tweaking these values in a production environment while I have no indication that it could solve the problem. Jorrit It seems you are running in to Bug #7209: http://bugs.mysql.com/bug.php?id=7209 This is fixed in 5.0.19 now. Best regards Mark -- Mark Leith, Support Engineer MySQL AB

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-04-03 Thread Mark Leith
quickly - so it's a fairly obvious one every time I see it now ;) Best regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: describe table : improvement

2006-04-19 Thread Mark Leith
a comment using COMMENT keyword: CREATE TABLE a_table ( a_column CHAR(30) CHARSET utf8 COMMENT 'Some comment' ); Is this... what you needed ? -- Gabriel PREDA Senior Web Developer Best regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL

Re: How to find size of my database

2006-05-03 Thread Mark Leith
- however shouldn't be that hard to script, either. Hope this helps! Best regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: UPDATE question

2006-05-03 Thread Mark Leith
table_name SET FIELD4 = (@tmp:=FIELD4), FIELD4 = FIELD1, FIELD1 = @tmp; Best regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: PRINT statement?

2006-05-12 Thread Mark Leith
user -BN dbname file.sql mysql -u root -BN -e SHOW DATABASES etc. Regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

RE: STORED PROCEDURE

2005-08-02 Thread Mark Leith
CREATE PROCEDURE title() BEGIN DECLARE title VARCHAR(255); SET title = '%Unconditional%'; SELECT title; END; // mysql CALL title()// +-+ | title | +-+ | %Unconditional% | +-+ 1 row in set (0.01 sec) HTH Mark Mark Leith Cool-Tools UK

RE: STORED PROCEDURE

2005-08-02 Thread Mark Leith
-Original Message- From: Scott Hamm [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 15:38 To: [EMAIL PROTECTED] Cc: Mysql Subject: Re: STORED PROCEDURE On 8/2/05, Mark Leith [EMAIL PROTECTED] wrote: CREATE PROCEDURE title() BEGIN DECLARE title VARCHAR(255); SET title

RE: STORED PROCEDURE

2005-08-02 Thread Mark Leith
-Original Message- From: Mark Leith [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 15:56 To: mysql@lists.mysql.com Subject: RE: STORED PROCEDURE -Original Message- From: Scott Hamm [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 15:38 To: [EMAIL PROTECTED] Cc

RE: Table and Data access only through procedures

2005-08-10 Thread Mark Leith
ON PROCEDURE admin.update_user_password TO .. to each user that you want to allow to update a password. Hope this helps out a little with the original question as well.. Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk -Original Message

RE: GRANT EXECUTE in MySQL 4.1

2005-08-12 Thread Mark Leith
believe.. EXECUTE on a GLOBAL level would, of course, allow the grantee to call any stored procedure. HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

RE: mysql database characterset

2005-08-12 Thread Mark Leith
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle MS SQL Server Upscene Productions http://www.upscene.com Database development questions? Check the forum! http://www.databasedevelopmentforum.com Yep.. Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http

RE: how to change ft_max_word_len value beyond 254

2005-08-12 Thread Mark Leith
language in the table, so I can verify this for you if you want ;) Perhaps your false misses are due to something else, such as ft_min_word_len, or the values being in more than 50% of the rows etc. Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk

RE: Why can't I revoke usage from user?

2005-08-16 Thread Mark Leith
sec) Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.10/73 - Release Date: 15/08/2005 -- MySQL General Mailing List For list

RE: Can I use the information from SHOW STATUS in a SELECT statment ?

2005-08-16 Thread Mark Leith
this in #mysql on freenode last night as it happens.. Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.10/73 - Release Date: 15/08/2005

RE: Change Datatype (time)

2005-08-16 Thread Mark Leith
datatype and I'd like to return the values in a vb-compatible datatype. You can use DATE_FORMAT() for this: http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk -- No virus found

RE: Date Ranges

2005-09-07 Thread Mark Leith
| +--+--++ 1 row in set (2.78 sec) Query OK, 0 rows affected (2.97 sec) Hope this helps, Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk http://leithal.cool-tools.co.uk -- No virus found in this outgoing message. Checked by AVG Anti-Virus

RE: colum totals

2005-09-16 Thread Mark Leith
on statements that have multiple GROUP BY columns ;) You can read more about WITH ROLLUP here: http://dev.mysql.com/doc/mysql/en/group-by-modifiers.html Mark Leith -Original Message- From: Tony Leake [mailto:[EMAIL PROTECTED] Sent: 16 September 2005 13:19 To: mysql@lists.mysql.com

RE: database link

2005-09-16 Thread Mark Leith
,'test','test',1,1,'PG'); 1 row created. ---change prompts--- mysql use sakila Database changed mysql select max(film_id) from film; +--+ | max(film_id) | +--+ | 100 | +--+ 1 row in set (0.01 sec) HTH Mark Leith -- No virus found in this outgoing

Re: trigger that calls a webservice??

2008-06-20 Thread Mark Leith
these anyway! ;) Cheers, Mark -- Mark Leith MySQL Regional Support Manager, Americas Sun Microsystems, Inc., http://www.sun.com/mysql/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Wrong PID

2008-06-30 Thread Mark Leith
LD_ASSUME_KERNEL=2.6.9', to switch back to LinuxThreads 'export LD_ASSUME_KERNEL 2.4.19'. I'd be interested in seeing if that stores the right PID for you whilst running under NPTL. Best regards Mark -- Mark Leith MySQL Regional Support Manager, Americas Sun Microsystems, Inc., http://www.sun.com/mysql

Re: quick question on innodb_log_file_size

2008-08-21 Thread Mark Leith
(log_file_size, innobase_log_file_size, The docs are wrong - I'll have that updated. Best regards Mark -- Mark Leith MySQL Regional Support Manager, Americas Sun Microsystems, Inc., http://www.sun.com/mysql/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Re: Need help with query

2007-05-01 Thread Mark Leith
clauses are done (where one can use a column alias, when not available within a WHERE clause). However, you should be able to use them in an ORDER BY - as they do exist at that point - so I'm not sure that issue would have been related to this. Best regards Mark -- Mark Leith, Support

Re: expire_logs_days

2007-05-02 Thread Mark Leith
) and will see how it works out. Cheers! Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: expire_logs_days

2007-05-02 Thread Mark Leith
Mark Leith wrote: Juan Eduardo Moreno wrote: Hi, I'm experience using expire_log_days and don't work. I set this parameters in the CNF and when the time of ( for example 5 days) is in, don't delete anything. On my expirience, this parameters don't work ( 5.0.27). I am testing this now

Re: expire_logs_days

2007-05-03 Thread Mark Leith
mysql drwxr-x---9 mysql wheel 306 May 3 10:52 test I declare 'No Bug Here' :) At least on the current versions of 5.0 (tested on 5.0.40), anyway. Cheers! Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com

Re: expire_logs_days

2007-05-04 Thread Mark Leith
testing does show that it's not working for you. Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: expire_logs_days

2007-05-04 Thread Mark Leith
on there? Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Can't find file: 'general_log'

2007-05-04 Thread Mark Leith
, and all these errors should go away. Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Greater function ?

2007-07-13 Thread Mark Leith
opposite LEAST().. Cheers, Mark -- Mark Leith, Senior Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: Mysql monitering and performance tool

2007-07-28 Thread Mark Leith
(transactions and all) to the monitor screen (it just monitors for key statistics and alerts when necessary). Cheers, Mark -- Mark Leith, Senior Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List

Re: Mysql monitering and performance tool

2007-07-30 Thread Mark Leith
-- Mark Leith, Senior Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Mysql monitering and performance tool

2007-07-30 Thread Mark Leith
Baron Schwartz wrote: Mark Leith wrote: Baron Schwartz wrote: I stand corrected. I don't know why I didn't think of this! So you guys had to go the route of parsing InnoDB status too, huh? Fun, isn't it! Indeed, it is a rather interesting thing to do ;) Made even better when

Re: MySQL Ends Enterprise Server Source Tarballs

2007-08-14 Thread Mark Leith
understand. Cheers, Mark -- Mark Leith, Senior Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: run out of memory

2007-08-15 Thread Mark Leith
, rather than a full 4G. Cheers, Mark -- Mark Leith, Senior Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Re: run out of memory

2007-08-15 Thread Mark Leith
Baron Schwartz wrote: Mark Leith wrote: And in practice, a 32bit binary is actually limited to around ~2.5-2.7G, rather than a full 4G. What are the practical memory limits for 64-bit binaries? I have heard that MySQL's indexing code is only 32-bit safe anyway, and I assume for example

Re: run out of memory

2007-08-15 Thread Mark Leith
Baron Schwartz wrote: Mark Leith wrote: And in practice, a 32bit binary is actually limited to around ~2.5-2.7G, rather than a full 4G. What are the practical memory limits for 64-bit binaries? I have heard that MySQL's indexing code is only 32-bit safe anyway, and I assume for example

Re: Monitoring and analysis tool

2007-12-16 Thread Mark Leith
), default is '*', i.e. match all -i NAME name of server instance (if using mysql.server startup script) -l don't subtract lock time from total time http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html Regards Mark -- Mark Leith, Manager of Support

Re: Monitoring and analysis tool

2007-12-16 Thread Mark Leith
Baron Schwartz wrote: Correct. But if you are willing to patch your server, you can: http://www.mysqlperformanceblog.com/2007/10/31/new-patch-for-mysql-performance/ This is in 5.1 as well now :) Regards Mark -- Mark Leith, Manager of Support, Americas MySQL AB, www.mysql.com Are you

Re: Sun and mysql

2008-01-17 Thread Mark Leith
: Marketing Potential. :) -- Mark Leith, Manager of Support, Americas MySQL AB, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: forcing leading 0 for numeric fields

2006-08-09 Thread Mark Leith
; +--+--+--+ | i| j| k| +--+--+--+ | 0023 | 3244 | 0123 | +--+--+--+ 1 row in set (0.08 sec) Make sure you specify the length of the digits that you would like padded to within the INT specification. Best regards Mark -- Mark Leith, Support Engineer MySQL AB

Re: need help on before insert trigger

2006-10-07 Thread Mark Leith
| +--+--+ | one | one bookmark | | xxx | hawt xxx sex | +--+--+ 2 rows in set (0.27 sec) Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List

Re: How can i drop tables with the same predix by using only one single statement?

2006-10-11 Thread Mark Leith
// ++ | Tables_in_test | ++ | a1 | | a2 | ++ 2 rows in set (0.00 sec) Hope this helps. Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification

Re: date_add function

2006-10-11 Thread Mark Leith
along the lines of what you want.. Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Re: date_add function

2006-10-11 Thread Mark Leith
. UPDATE this_table SET this_date = '$this_date', future_date = '$this_date' + INTERVAL 90 DAY; Same thing still applies really.. And quote your dates... Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com

Re: Sort Select by List

2006-12-16 Thread Mark Leith
'... Thanks, order by right(office,1) or make an extra column for ordering Or be really smart :) SELECT * FROM team ORDER BY office='Exec' DESC,office='VP' DESC,office='Dir' DESC; Not many people know that you can order by literals as well ;) Cheers, Mark -- Mark Leith, Support

Re: Sort Select by List

2006-12-17 Thread Mark Leith
(although, they will still likely be in memory unless you the table is large, again). You should of course EXPLAIN and tune accordingly (with response times as well). Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified

Re: Fulltext problem

2007-01-04 Thread Mark Leith
, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Strange Crashing Error - Assertion failed: fixed == 1, file item.h, line 1601

2007-01-08 Thread Mark Leith
this in the bug report as well Do you have any way to reproduce this as yet? Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com

Re: Need SUPER Privilidge for UPDATE?

2007-01-08 Thread Mark Leith
CURRENT_USER) to have the SUPER privilege. Within 5.1 this moves to the TRIGGER privilege. Best regards Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http

Re: Alias a function result?

2007-01-23 Thread Mark Leith
? Perfectly legal, will not get changed. :) Cheers, Mark -- Mark Leith, Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Alias a function result?

2007-01-24 Thread Mark Leith
is *not* the alias but the individual column. Results of an aggregate function are *never* available in a WHERE clause. You need a HAVING clause. Ahh indeed, I was only looking at the aliasing of the group concat function. :) Teach me for skimming emails! Mark -- Mark Leith, Support Engineer MySQL AB

RE: Stored Procedure?

2004-11-30 Thread Mark Leith
. It will then generate an application error to the user with another procedure. Don't get me wrong Rhino, your example was great, and is still very applicable.. I just thought this might be a slightly more insightful example of what SP's can really handle. Best regards Mark Mark Leith Cool-Tools UK

RE: Stored Procedure?

2004-11-30 Thread Mark Leith
would be fantastic as well!! Mark dreaming away the day -Original Message- From: Rhino [mailto:[EMAIL PROTECTED] Sent: 30 November 2004 16:04 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Stored Procedure? - Original Message - From: Mark Leith [EMAIL PROTECTED

RE: Cannot create Windows service for MySql. Error: 0

2005-01-06 Thread Mark Leith
the current installed service. If you can't get to this (i.e the install dir has been removed) - with the new installer you can use a different name for the service, such as MYSQL41. HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk -Original Message- From: Gleb

RE: Question: InnoDB transaction and table changes

2005-02-04 Thread Mark Leith
: http://dev.mysql.com/doc/mysql/en/cannot-roll-back.html HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk -Original Message- From: Ville Karjalainen [mailto:[EMAIL PROTECTED] Sent: 04 February 2005 13:59 To: mysql@lists.mysql.com Subject: Question: InnoDB transaction

RE: auto-increment stops at 127

2005-02-14 Thread Mark Leith
Change the column from a TINYINT (which has a maximum value of 127), see here: http://dev.mysql.com/doc/mysql/en/numeric-types.html HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk -Original Message- From: mel list_php [mailto:[EMAIL PROTECTED] Sent: 14

RE: referencial integrity problem

2005-02-22 Thread Mark Leith
Foreign keys are only supported within InnoDB tables (on both sides).. Mark Mark Leith Cool-Tools http://www.cool-tools.co.uk -Original Message- From: Philipp Snizek [mailto:[EMAIL PROTECTED] Sent: 22 February 2005 10:30 To: Mysql List (E-mail) Subject: referencial integrity problem

RE: 5.03 Still crashes on win32

2005-03-29 Thread Mark Leith
if you do.. Cheers, Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk -Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: 29 March 2005 10:39 To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: 5.03 Still crashes on win32 Warning, do

RE: how to run a file in MySQL

2005-04-04 Thread Mark Leith
Hi Joppe, Use SOURCE or \. to execute the filename: mysql SOURCE E:\SQL\MySQL\test_tables.sql Database changed ++ | Tables_in_test | ++ | a | | academies | . HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk

RE: Maximize mysql ini for 4gig big query win 2003 box

2005-04-28 Thread Mark Leith
read more about this here: http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx Basically, add a \3GB switch to your boot.ini file. Then you can start look at tuning the memory on MySQL as well.. HTH Mark Mark Leith Cool-Tools UK Limited http://www.cool-tools.co.uk

RE: Null alphabetic order

2005-07-13 Thread Mark Leith
. instead of: Null, A, B, C result would be: X, Y, Z, null How can I get around to that? Something like ORDER BY IF(col IS NULL, 1, 0), col Michael Or simply: ORDER BY col IS NULL, col Which will probably be *slightly* faster.. Mark Mark Leith Cool-Tools UK