Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Saturday 11 July 2015

How to select timestamp value in Teradata

Below is the example as how we can select timestamp values in Teradata:-

If you want to know on particular time how many employee have join us then you can use equals to sign(=)














SELECT EMPNO, EMPNAME, EMPSAL, JOIN_DATE FROM EMPLOYEE
WHERE JOIN_DATE = TIMESTAMP '2010-01-15 08:02:42';

If you are not sure when the employee has join you and you need to find out from the number of day's then you can use something like below mentioned:-

SELECT EMPNO,EMPNAME,EMPSAL,JOIN_DATE
FROM EMPLOYEE
WHERE JOIN_DATE > TIMESTAMP '2010-01-15 08:02:42'
AND JOIN_DATE < TIMESTAMP '2010-01-30 11:20:30';



No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.