MYSQL-STRAIGHT_JOIN在此代码中做什么? [英] MYSQL - What does STRAIGHT_JOIN do in this code?
本文介绍了MYSQL-STRAIGHT_JOIN在此代码中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
STRAIGHT_JOIN
在此代码中做什么?
SELECT STRAIGHT_JOIN ClosingBalance
FROM Accounts
WHERE idAccounts = FidDebit;
解决方案
STRAIGHT_JOIN旨在作为MySQL查询优化器的指令,该表必须按照查询中列出的顺序从左到右连接表.>
http://dev.mysql.com/doc/refman/5.0/en/join.html
由于此查询中只有一个表,因此它似乎没有做任何事情.
What does STRAIGHT_JOIN
do in this code ?
SELECT STRAIGHT_JOIN ClosingBalance
FROM Accounts
WHERE idAccounts = FidDebit;
解决方案
STRAIGHT_JOIN is intended as an instruction to the MySQL query optimiser that the tables must be joined from left to right in the order they are listed in the query.
http://dev.mysql.com/doc/refman/5.0/en/join.html
As you only have one table in this query, it wouldn't appear to be doing anything.
这篇关于MYSQL-STRAIGHT_JOIN在此代码中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文