Dan Jones unknowingly asked us:

UPDATE table1 SET table2ID = NULL WHERE table1.table2ID NOT FOUND IN
table2.ID;

The NOT FOUND IN isn't SQL, of course, but I'm not sure what should go
there.

In MySql, its 'NOT IN'


and not

'NOT FOUND IN'.

To delete all references, you need to set up a Trigger.

Or else, just use multiple queries, to either delete the referenced columns, or to set values in them to NULL.

--
[ Rajesh Kumar ]
__________________________________________
Meet the guy at http://www.meetRajesh.com/


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



Reply via email to