Not getting desired output in Oracle -
table creation query:
create table students( student_no number, student_name varchar2(20), student_addres varchar2(25), student_dob date joining_time date )
insert query:
insert students values (1,'ram','chittoor',to_date('02/04/2012','dd/mm/yyyy'),to_date('01:21:45','hh:mi:ss))
result:1 row inserted
query check insert:
select * students
result:
student_no student_name student_address student_dob joining_date .......... ............ ............... ........... ............ 1 ram chittoor 2-apr-2012 1-jul-2012
qhy time values not getting inserted properly?
here working example
if want time joining_time column your,
select query should be
select student_no, student_name, student_addres, student_dob, to_char (joining_time, 'hh:mi:ss') joining_time students
Comments
Post a Comment