diff options
author | unknown <monty@hundin.mysql.fi> | 2001-08-28 06:43:55 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-08-28 06:43:55 +0300 |
commit | bfe2213babce74eac616dd3be0c8ac5bce16f032 (patch) | |
tree | 476d8d3dea118db2d3981f0e5754e23cc70924ab /Docs/manual.texi | |
parent | 30774b35493d3ad14ee40b73d4b9ffff51dd6cd1 (diff) | |
download | mariadb-git-bfe2213babce74eac616dd3be0c8ac5bce16f032.tar.gz |
Fixed that LOAD DATA INFILE works with transactions.
Fix for lower case filenames
BitKeeper/deleted/.del-select.tst~2e626fa07144d2c8:
Delete: mysql-test/misc/select.tst
Docs/manual.texi:
Better examples for sub selects
bdb/lock/lock_region.c:
Fixed not critical error
mysql-test/r/gemini.result:
Testcase for load data infile
mysql-test/t/gemini.test:
Testcase for load data infile
sql/sql_load.cc:
Fixed that LOAD DATA INFILE works with transactions
sql/sql_show.cc:
Fix for lower case filenames
sql/sql_string.cc:
cleanup
Diffstat (limited to 'Docs/manual.texi')
-rw-r--r-- | Docs/manual.texi | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index a3397de70a6..6e77f0110cd 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -3730,18 +3730,31 @@ list in this manual. @xref{TODO}. @cindex sub-selects -The following will not yet work in MySQL: +MySQL currently only supports sub selects of the form @code{INSERT +... SELECT ...} and @code{REPLACE ... SELECT ...}. You can however use +the function @code{IN()} in other contexts. + +In many cases you can rewrite the query without a sub-select: @example SELECT * FROM table1 WHERE id IN (SELECT id FROM table2); +@end example + +This can be re-written as: + +@example +SELECT table1.* FROM table1,table2 WHERE table1.id=table2.id; +@end example + +The queries: +@example SELECT * FROM table1 WHERE id NOT IN (SELECT id FROM table2); SELECT * FROM table1 WHERE NOT EXISTS (SELECT id FROM table2 where table1.id=table2.id); @end example -However, in many cases you can rewrite the query without a sub-select: +Can be rewritten as: @example -SELECT table1.* FROM table1,table2 WHERE table1.id=table2.id; SELECT table1.* FROM table1 LEFT JOIN table2 ON table1.id=table2.id where table2.id IS NULL @end example @@ -3777,11 +3790,9 @@ second instance of the interpreter: prompt> mysql --skip-column-names mydb < myscript.sql | mysql mydb @end example -MySQL only supports @code{INSERT ... SELECT ...} and -@code{REPLACE ... SELECT ...} Independent sub-selects will probably -be available in Version 4.0. You can now use the function @code{IN()} in -other contexts, however. - +MySQL 4.0 supports multi-table deletes that can be used to efficiently +delete rows based on information from one table or even from many tables +at the same time. @node Missing SELECT INTO TABLE, Missing Transactions, Missing Sub-selects, Missing functions @subsubsection @code{SELECT INTO TABLE} |