I have read through quite a bit of the MySQL manual concerning subqueries and
cannot
seem to get even the simplist of queries to work!
I have a table called PersonRole which is the many-to-many joint table between
two
upper tables, Person and Role. I have tested the two pieces of the query
Make sure the subquery returns a scalar value. Either
the roleDBNum column has to be unique or you need to
apply an aggregate function to reduce to a single
value. If the the subquery returns many values, use
the IN operator instead of =.
Disclaimier: I'm still new to MySQL, but I'm assuming
it
Hi Renee,
Check the version of your MySQL. The subqueries feature is available from
MySQL 4.1
Hope this helps you.
- Harish
-Original Message-
From: Renee Henderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 6:17 AM
To: mysql@lists.mysql.com
Subject: simple subquery
Hello,
I have problem with this syntax:
SELECT game_id FROM game WHERE game_id NOT IN (SELECT game_id FROM player WHERE
user_id!=$id_user)
I need select games where user is not connected. I have two tables
game(game_id, ) and player(player_id, game_id, user_id, ...). In table
player are
I have problem with this syntax:
SELECT game_id FROM game WHERE game_id NOT IN (SELECT game_id FROM player
WHERE user_id!=$id_user)
I need select games where user is not connected. I have two tables
game(game_id, ) and player(player_id, game_id, user_id, ...). In table
player are many
Hello:
I am new to this and am having trouble with subqueries.
Using MySQL 3.23
I have a Contacts table, and a Users table each with a ContactId field.
I want to retrieve the ContactID from the Users table where UserName and
UserPassword are such and such, I then want to get the FirstName
]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 3:55 PM
Subject: subquery syntax
Hello:
I am new to this and am having trouble with subqueries.
Using MySQL 3.23
I have a Contacts table, and a Users table each with a ContactId field.
I want to retrieve the ContactID from the Users table where
AM
To: [EMAIL PROTECTED]
Subject: subquery syntax
Hello:
I am new to this and am having trouble with subqueries.
Using MySQL 3.23
I have a Contacts table, and a Users table each with a ContactId field.
I want to retrieve the ContactID from the Users table where UserName and
UserPassword
. Argg. Apparently you will have to wait for version 4.1.
Subqueries are not supported
Jeff
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 3:55 PM
Subject: subquery syntax
Hello:
I am new to this and am having trouble
Subject: subquery syntax
Hello:
I am new to this and am having trouble with subqueries.
Using MySQL 3.23
I have a Contacts table, and a Users table each with a ContactId field.
I want to retrieve the ContactID from the Users table where UserName and
UserPassword
- Original Message -
From: Daniel Brockhaus [EMAIL PROTECTED]
To: Jeff Dyer [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 4:43 PM
Subject: Re: subquery syntax
Wouldn't
SELECT Contacts.FirstName, Contacts.LastName FROM Contacts, Users WHERE
11 matches
Mail list logo