I've got mysql-4.1.10 installed.

From: Chris <[EMAIL PROTECTED]>
To: mysql@lists.mysql.com
Subject: Re: udpate / subquery
Date: Sat, 28 May 2005 22:31:19 -0700

Syntax looks fine to me.

Sub-queries are only supported in 4.1.x+ , I'm guessing that's your problem.

Chris

Lieven De Keyzer wrote:

UPDATE account
SET role_id = (SELECT role_id FROM role WHERE rolename = "admin")
WHERE username = "test"

This gives me an:
ERROR 1064 (00000): You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT role_id from role WHERE rolename="admin")' at line 1

I can't see anything wrong with the syntax?





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




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

Reply via email to