- 论坛徽章:
- 0
|
怎么理解下面这条Mysql语句
这句是从最新的mysql手册上copy下来的,具体看下:
1.5.2.1 Features Available in MySQL 4.1
The features listed in this section are implemented in MySQL 4.1. A few other features are
still planned for MySQL 4.1. See Section 1.8.1 [TODO MySQL 4.1], page 50.
Most new features being coded, such as stored procedures, will be available in MySQL 5.0.
See Section 1.8.2 [TODO MySQL 5.0], page 51.
Support for subqueries and derived tables
² Subqueries are now supported. Here is an example:
SELECT * FROM t1 WHERE t1.a=(SELECT t2.b FROM t2);
SELECT * FROM t1 WHERE (1,2,3) IN (SELECT a,b,c FROM t2);
² Derived tables (unnamed views) are now supported. Basically, a derived
table is a subquery in the FROM clause of a SELECT statement. Here is an
example:
SELECT t1.a FROM t1, (SELECT * FROM t2) t3 WHERE t1.a=t3.a; |
|