Saturday 15 March 2014

mysql - How to rewrite this SELECT query -


I have been left with some code that looks like this:

  SELECT DISTINCT ee. * Our DB Admin is shouting about selecting all, and wants us to capture all the different areas separately from WHERE enabled = 'Y' from EX_extensions. I have never chosen the  *  never seen before; How do I rewrite it?  

Option 1:

  Select Variation ee.extension_id, ee.class, ee.method, ee.hook, ee.settings, ee. Priority, for EX_extensions from EE.version, ee.enabled, select WHERE enabled = 'y'   

option 2:

 . Extension_id, ie to enable something, where enabled = 'y'   

Exclamation from .class, ee.method, ee.hook, ee.settings, ee.priority, ee. Version, ee.enabled) the way completely?

There is no difference between option 1 or option 2. One column in one column col1 is all one of these results is generated:

  select t1 from DISTINCT * 1 Select t1 from t1 Select from (col1) t1 to SELECT * F1 t1 SELECT col1 to t1   

all * Select (call1) mandatory The form extends into all available columns on the table.

No comments:

Post a Comment