Wednesday, July 11, 2007

Inserting Date And Selecting Particular Date From Table Using Oracle

Cearting A Sample Table With The Date Field

create table EMP1_Test(id varchar(5),Fname varchar(10), DOB date)
insert into EMP1_Test(ID,FNAME,DOB) values('1','Test',to_date('19991010','yyyymmdd'))
insert into Emp1_Test(ID,FNAME,DOB) values('2','Test',to_date('11101999','mmddyyyy'))

select * from EMP1_test



select * from EMP1_Test where to_char(dob,'MM/DD/YYYY') = '10/10/1999'



No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.