Write a query to find the employees from EMP table those who
have joined in Monday. (there is a column as hiredate which is
a date column i.e values are like 03-DEC-81)
Answers were Sorted based on User's Feedback
Answer / l meher
SQL> select ename,hiredate from emp where trim(to_char(trunc(hiredate),'DAY')) = 'MONDAY';
ENAME HIREDATE
---------- ---------
MARTIN 28-SEP-81
| Is This Answer Correct ? | 10 Yes | 1 No |
Answer / jprakash025
SQL> select ename,hiredate from emp
2 where
3 to_char(hiredate,'day') like '%sunday%';
ENAME HIREDATE
---------- ---------
WARD 22-FEB-81
SCOTT 19-APR-87
i dont hv monday data, thats y i m using sunday
| Is This Answer Correct ? | 9 Yes | 3 No |
Answer / pramod
select *
from tbl_employees
where DATENAME(DW,hiredate)='Monday' order by hiredate
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / siva
Select* from emp where to_char(hiredate,'dy')='mon';
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / masuduz zaman
SELECT * FROM EMP
WHERE (DATEPART(dw, HIREDATE) + @@DATEFIRST) % 7 = 2
| Is This Answer Correct ? | 0 Yes | 3 No |
How does postgresql compare to mysql?
how to check myisam tables for errors? : Sql dba
counting the no.of characters occurs in a string by using pl/sql function
What is view? Can we update view
what is explain plan?, given an example...
what is hash join
How long does it take to learn pl sql?
what is definer rights invoke rights?
How do you take the union of two tables in sql?
Which is faster joins or subqueries?
what is bcp? When is it used?
What is attribute indicator in pl sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)