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

mongodb keeps data in two places

linux mongodb ubuntu server

My remote server is ubuntu 14.04 and I have mongodb installed there. But when I tried to restore my DataBase using mongorestore I noticed the disk space in the following two places have reduced

When does the call() method get called in a Java Executor using Callable objects?

java concurrency

This is some sample code from an example. What I need to know is when call() gets called on the callable? What triggers it?