Create table events (
uid BIGINT NOT NULL AUTO_INCREMENT,
name VARCHAR(255),
start_date DATE,
duration INTEGER,
location_id BIGINT,
primary key (uid)
);
Create table locations (
uid BIGINT NOT NULL AUTO_INCREMENT,
name VARCHAR(255),
address VARCHAR(255),
primary key (uid)
)
Alter table events
- Original Message -
From: kalin mintchev [EMAIL PROTECTED]
To: Adam [EMAIL PROTECTED]
Cc: MySQL General [EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 11:33 PM
Subject: Re: syntax question..
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post
I think you need to do something like this:
select t1.data
from table1 t1 inner join table2 t2 on t1.zip = t2.zip
where t2.chain like '%carmike%';
i tried this one... it seams to work. i'll read a bit more about joins ..
thank you... appreciate it...
You're welcome!
Rhino
--
Hi
sub selects are only supported from MySql 4.1 onwards, so it may be invalid
if you have an earlier version.
you may also cause a conflict by using the database alias (t1) as the name
of the result
Peter
-Original Message-
From: kalin mintchev [mailto:[EMAIL PROTECTED]
Sent: 14
On Sunday 14 November 2004 05:05 pm, kalin mintchev wrote:
can somebody please explain what is wrong with this command:
select t1.data from table1 as t1 where t1.zip=(select * from table2 as t2
where t2.chain like %carmike%);
If your no usiing 4.1, subselects are not even allowed..
If so..
- Original Message -
From: kalin mintchev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 6:05 PM
Subject: syntax question..
hi everybody..
can somebody please explain what is wrong with this command:
select t1.data from table1 as t1 where t1.zip=(select *
- Original Message -
From: kalin mintchev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 6:05 PM
Subject: syntax question..
hi everybody..
can somebody please explain what is wrong with this command:
select t1.data from table1 as t1 where t1.zip=(select *
thanks to all... yes, Rhino - i'm new. my first post.
the version is the problem indeed. it's 4.0.13-standard.
how would i achieve the same query in this version?...
thank you..
Hi
sub selects are only supported from MySql 4.1 onwards, so it may be invalid
if you have an earlier version.
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post. the version is the problem indeed. it's
Kalin 4.0.13-standard. how would i achieve the same
Kalin query in this version?...
You'll need to provide the following:
(1) What is the result you want to achieve?
(2) What are the
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post. the version is the problem indeed. it's
Kalin 4.0.13-standard. how would i achieve the same
Kalin query in this version?...
You'll need to provide the following:
(1) What is the result you want to achieve?
well:
- Original Message -
From: kalin mintchev [EMAIL PROTECTED]
To: Adam [EMAIL PROTECTED]
Cc: MySQL General [EMAIL PROTECTED]
Sent: Sunday, November 14, 2004 11:33 PM
Subject: Re: syntax question..
Kalin,
Kalin thanks to all... yes, Rhino - i'm new. my first
Kalin post
On Mon, Jun 16, 2003 at 12:45:53PM -0400, Martin's - Web Dept. wrote:
I am quite willing to acknowledge that I'm new at this ...
But I can't find the syntax error in this query:
SELECT * FROM products WHERE MATCH (desc) AGAINST ('usb')
desc is a field name, usb is the keyword I'm
On Mon, 16 Jun 2003 12:45:53 -0400, Martin's - Web Dept. wrote:
I am quite willing to acknowledge that I'm new at this ...
But I can't find the syntax error in this query:
SELECT * FROM products WHERE MATCH (desc) AGAINST ('usb')
desc is a field name, usb is the keyword I'm searching
Hi,
try this
SELECT user.*, wbs.name
FROM
user_wbs INNER JOIN user ON user.id = user_wbs.user_id INNER JOIN
wbs ON wbs.id = user_wbs.wbs_id
that should do the same as your select
just MySQL doesnt like nested joins/selects
hope this will be sorted out in 4.1
Tommy
-Original
Tom Churm ([EMAIL PROTECTED]) writes:
hi,
i've got a table collecting info from html forms. problem is, certain
wiseguys always make multiple entries. could someone clue me in to how
i can select the Last entry where there is a duplicate for the User
(type text, these are email
that are in B
but not in A.
- Original Message -
From: { randy } [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 14:05
Subject: Re: Syntax question for a beginner..
Well, I think I got it figured out. I am using PHP, and thought I could
lick
it with just one
You are the man...thanks a bunch! that's what I needed.
=
r a n d y / sesser at mac.com
From: Rolf Hopkins [EMAIL PROTECTED]
Date: Fri, 6 Jul 2001 14:39:59 +0800
To: { randy } [EMAIL PROTECTED], MySQL [EMAIL PROTECTED]
Subject: Re: Syntax question for a beginner
I remember somewhere has mentioned that MySQL does not copy with nested
SELECT query. Properly it is the reason.
Shania Qiu
-Original Message-
From: { randy } [mailto:[EMAIL PROTECTED]]
Sent: Friday, 6 July 2001 4:29 p.m.
To: MySQL
Subject: Syntax question for a beginner..
Alright,
I had never seen WHERE NOT before.
Does this exist in mysql
siomara
From: Shania Qiu [EMAIL PROTECTED]
To: '{ randy }' [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: Syntax question for a beginner..
Date: Fri, 6 Jul 2001 16:39:47 +1200
I remember somewhere has mentioned that MySQL
I am a rookie as well so this may not work but I think it should. Could you
not just copy all of one into the other and then select all out of it using
DISTINCT so you get no duplicates out of it?
Bomber Steel
Mankind has, ever since it began to think,
worshipped that which it cannot
Even if sub-selects were available in MySQL (which they're not), that query
would still not work as it will only select the values that are unique to
tableA.
What you would be looking at is something like:
SELECT email
FROM tableA
UNION
SELECT email
FROM tableB
But unfortunately, UNION is not
21 matches
Mail list logo