SQL Rows in updated in last 10 hours

My table structure is something like below:

Table: Employee

<br><br>
<pre>
  <tr>
    <td>EName</td>
    <td>EId</td>
    <td>DeptNo</td>
    <td>DOJ</td>
  </tr>
  <br>
  <tr>
    <td>X</td>
    <td>1</td>
    <td>1</td>
    <td>12/9/2013 2:47:35 AM</td>
  </tr>
  <br>
  <tr>
    <td>Y</td>
    <td>2</td>
    <td>2</td>
    <td>12/9/2013 2:47:35 PM</td>
  </tr>
  <br>
  <tr>
    <td>Z</td>
    <td>3</td>
    <td>3</td>
    <td>12/9/2013 8:25:45 AM</td>
  </tr>
  <br>
  <tr>
    <td>-</td>
    <td>-</td>
    <td>-</td>
    <td>-</td>
  </tr>
  <br>
</pre>
.... 
<br>

I need to fetch the employee Name who joined in last 10 hours... how do I do it?

Answers


Might this will work

SELECT ENAME FROM EMPLOYEE 
WHERE 
HOUR(TIMEDIFF(DATE_SUB(NOW(),INTERVAL 10 HOUR),NOW())) <= 10

Need Your Help

Supervised Motion Detection Library

algorithm image-processing opencv machine-learning computer-vision

Can anyone recommend a motion detection library that's trainable via a supervised learning algorithm?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.