RE: Removing Entries From a MySQL Table

2004-07-20 Thread Sommerfield, Thomas P
Hello;

DELETE FROM table_name WHERE 1 ;

This command will remove all rows from the table.

For more information, see: 
http://dev.mysql.com/doc/mysql/en/DELETE.html

Make sure you have a backup if you think you may need the data in the
future. 

-Tom 

-Original Message-
From: Michael Mason [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 2:47 PM
To: 'MySQL Mailing List'
Subject: Removing Entries From a MySQL Table


I've been looking through the manual and searching the web for the
command and syntax used to do the above.
 
I basically just want to clear a table I use for logon entries. Can
anyone help with this please.?
 
 
Michael Mason
Business Support Services
ArrasR People
 
Tel: 01706 342310
Mobile: 07793 782287
Fax: 01706 642754


Member of the Recruitment Employment Confederation (00052055)
The views expressed in this mail are entirely those of the sender, and
do not necessarily represent the views or position of Arras Services
Ltd. The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking any action
in relation to the contents of this information is strictly prohibited
and may be unlawful. Neither the sender nor the represented institution
is liable for the correct and complete transmission of the contents of
this e-mail, or for its timely receipt.
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: NULL problem

2004-07-19 Thread Sommerfield, Thomas P
Try 

SELECT * FROM table ORDER BY col LIMIT 23 ;

If the col type is numeric, trying to match the string NULL might be the
problem. And, if it is numeric, the NULL values will be listed first in
'ORDER BY col'. 

This doesn't really solve the problem of not being able to select 'where
col is null', but should at least be of some use.

Hope that helps,

-Tom

-Original Message-
From: Deepak Vishwanathan [mailto:[EMAIL PROTECTED]
Sent: Monday, July 19, 2004 11:14 AM
To: [EMAIL PROTECTED]
Subject: NULL problem


Hi,

 

I have a table with a column that has the Unique key constraint on it.
In the table definition that column has a default NULL specification
too.

 

So, when I ran the query select * from table where col is NULL;

 

I get only 1 row returned, when I have 23 such rows with NULL values.
This might be because of the Unique Key constraint. Is there a query
that will return all those 23 rows.

 

Thanks,

Deepak

 

 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]