mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-4.1
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
select (select 2);
|
||||
(select 2)
|
||||
2
|
||||
drop table if exists t1,t2,t3,t4,t5,attend,clinic;
|
||||
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b int);
|
||||
create table t3 (a int);
|
||||
@ -147,4 +147,16 @@ W 1
|
||||
SELECT * FROM t3 WHERE b = (SELECT MIN(b) FROM t3);
|
||||
a b
|
||||
W a
|
||||
drop table t1,t2,t3,t4,t5,attend,clinic;
|
||||
drop table if exists inscrit;
|
||||
CREATE TABLE `inscrit` (
|
||||
`pseudo` varchar(35) character set latin1 NOT NULL default '',
|
||||
`email` varchar(60) character set latin1 NOT NULL default '',
|
||||
PRIMARY KEY (`pseudo`),
|
||||
UNIQUE KEY `email` (`email`)
|
||||
) TYPE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO inscrit (pseudo,email) VALUES ('joce','test');
|
||||
INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1');
|
||||
INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1');
|
||||
SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo LIKE '%joce%');
|
||||
Subselect returns more than 1 record
|
||||
drop table if exists inscrit;
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
select (select 2);
|
||||
drop table if exists t1,t2,t3,t4,t5,attend,clinic;
|
||||
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b int);
|
||||
create table t3 (a int);
|
||||
@ -66,4 +66,19 @@ SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
|
||||
SELECT * FROM t2 WHERE b = (SELECT MIN(b) FROM t2);
|
||||
SELECT * FROM t3 WHERE b = (SELECT MIN(b) FROM t3);
|
||||
|
||||
drop table t1,t2,t3,t4,t5,attend,clinic;
|
||||
drop table if exists inscrit;
|
||||
|
||||
CREATE TABLE `inscrit` (
|
||||
`pseudo` varchar(35) character set latin1 NOT NULL default '',
|
||||
`email` varchar(60) character set latin1 NOT NULL default '',
|
||||
PRIMARY KEY (`pseudo`),
|
||||
UNIQUE KEY `email` (`email`)
|
||||
) TYPE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
INSERT INTO inscrit (pseudo,email) VALUES ('joce','test');
|
||||
INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1');
|
||||
INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1');
|
||||
-- error 1240
|
||||
SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo LIKE '%joce%');
|
||||
|
||||
drop table if exists inscrit;
|
Reference in New Issue
Block a user