Sunday, June 24, 2018 Useful Resources for Industrial Technology Enthusiasts!





  Welcome to the Automation Media's - MySQL made Easy for Engineers
  MySQL Tutorial - Order By

 




 
MySQL Tutorial - Order By


We can use ORDER BY statement to make MySQL results easier to read and understand. A common way to do this in the real world is to order a big list of items by name or amount. The way to order your result in MySQL is to use the ORDER BY statement.

What ORDER BY does is it takes the a column name that you specify and sorts it in alphabetic order (or numeric order if you are using numbers).





Query: Show all records not containing the name "Paul" AND the Alarms on Node 'SCADA3' order by the Time.

SELECT * FROM [table name] WHERE name != "Paul" AND NodeName= 'SCADA3' ORDER BY TimeIn;





Go Back To MySQL Tutorial


 


........

Site customized for Screen Resolution - 1400 x 1050
Site Map    I    Copyright © 2018 Automation Media. All rights reserved.