[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



YUCK!  Are you coming from MS SQL Server or something? ;p 

What's wrong with a join?

select * from users inner join ALARMS on users.user_id = ALARMS.user_id WHERE ALARMS.ID=1;

Using nested SELECT statements when a join is the right tool for the job is.. nasty.

Cheers,
--George


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00028" href="msg00028.html">[ale] MySQL Question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00018" href="msg00018.html">[ale] MySQL Question</a></strong>
<ul><li><em>From:</em> Jerry.Yu at Voicecom.com (Yu, Jerry)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00025.html">[ale] Speed comparison</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00027.html">[ale] MySQL Question</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00031.html">[ale] MySQL Question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00028.html">[ale] MySQL Question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00026"><strong>Date</strong></a></li>
<li><a href="threads.html#00026"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>