Hi!
I do not know how to use INSERT and UNION together.
For example:
INSERT INTO tmp_table_name (a)
(SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY
a LIMIT 10)
UNION
(SELECT a FROM table_name WHERE a=11 AND B=2 ORDER BY
a LIMIT 10)
ORDER BY a;
It does not work. But I think it should. Have
George Georgeus wrote:
Hi!
I do not know how to use INSERT and UNION together.
For example:
INSERT INTO tmp_table_name (a)
(SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY a LIMIT
10) UNION (SELECT a FROM table_name WHERE a=11 AND B=2 ORDER
BY a LIMIT 10) ORDER BY a; It does not work
Hi!
On Dec 02, George Georgeus wrote:
Hi!
I do not know how to use INSERT and UNION together.
For example:
INSERT INTO tmp_table_name (a)
(SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY
a LIMIT 10)
UNION
(SELECT a FROM table_name WHERE a=11 AND B=2 ORDER BY
a LIMIT 10)
ORDER
Hi,
select count(*) is very slow in innodb (because it is a table scan). Is
there any difference if I change it to select count(column).
I did some test and some times select count(*) is really slow and some time
select count(column) is slow. Could anyone help me?
If I need do a select
- Dathan Vance Pattishall
- Sr. Programmer and mySQL DBA for FriendFinder Inc.
- http://friendfinder.com/go/p40688
---Original Message-
--From: Hsiu-Hui Tseng [mailto:[EMAIL PROTECTED]
--Sent: Thursday, November 06, 2003 3:41 PM
--To: [EMAIL PROTECTED]
--Subject: select count
At 15:41 -0800 11/6/03, Hsiu-Hui Tseng wrote:
Hi,
select count(*) is very slow in innodb (because it is a table scan). Is
there any difference if I change it to select count(column).
I did some test and some times select count(*) is really slow and some time
select count(column) is slow. Could
Hallo my friends
I am writing a database application program with PHP
and MySQL. I have two tables that I want to query in
the same time with SELECT...UNION SELECT ... syntax.
Too many errors encountered; the rest of the message
is ignored:
The 2 tables are APPOINTMENT table (APP
to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.
You have written the following:
SELECT
Hello,
I would like to do this witihn mysql:
SELECT con.id,con.name FROM contacts con, registrar_contact reg
WHERE NOT con.id IN
(SELECT contactid FROM registrar_contact WHERE registrarid=1)
can someone tell me how to do this ?
contacts table consists of:
id(primary key)
name
Hello,
I would like to do this witihn mysql:
SELECT con.id,con.name FROM contacts con, registrar_contact reg
WHERE NOT con.id IN
(SELECT contactid FROM registrar_contact WHERE registrarid=1)
can someone tell me how to do this ?
contacts table consists of:
id(primary key)
name
[snip]
SELECT con.id,con.name FROM contacts con, registrar_contact reg
WHERE NOT con.id IN
(SELECT contactid FROM registrar_contact WHERE registrarid=1)
[/snip]
Current versions of MySQL do not support sub-selects.
HTH!
Jay
You can use JOIN...
See: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html
Gurhan
-Original Message-
From: van den Heuvel, Frank [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 8:47 AM
To: '[EMAIL PROTECTED]'
Subject: select in select
Hello,
I would like to do
Hello,
Please,
I use MySql, I would use INTERSECT/UNION functions and
they don't work, I need help,
My query is :
select E.*, ME.Emplacement, E.Url,E.EMail, C.Name From
Entreprise E, Mot_Entreprise ME, Mot M, Categorie C
where
(E.ID=ME.ID) and (ME.CodeMot=M.CodeMot) and (M.Mot
like 'word1
hi,
i was wondering if the above is possible in mysql. i was working on a query
but it keep throwing me syntax error.
example:
sql select * from table1 where id in (select id from table1 group by id
having count(id) 1)
the above statement works perfectly in mssql...
thanks regards,
lance
Hi again
If I try the following on my MySQL DB, I get an error:
select user_id from tblUser where user_id in (select user_id from
tblUserLink where group_id = xx)
xx is an integer defining which group_id we want info on (mediumint(9))
user_id in tblUser and tblUserLink is also defined
ect: newbie: problem with "select in (select)"
Hi again
If I try the following on my MySQL DB, I get an error:
select user_id from tblUser where user_id in (select user_id from
tblUserLink where group_id = xx)
xx is an integer defining which group_id we want info on (mediumint(9))
user
16 matches
Mail list logo