I tried creating a table and one of the attributes 'appdate' must have a data dtype date which includes the time as well. I've tried using the to char but then it says invalid relational operator. HOw do i do this?
SQL> create table appointment
2 (StaffID char(10), constraint appointment_staffid_fk
3 foreign key (staffid) references staff (staffid),
4 PatientNum varchar2(10), constraint appointment_PatientNum_fk
5 foreign key (patientnum) references patient (patientnum),
6 appdate date
7 constraint appointment_appdate_ch check (to_char(appdate, "mm/dd/yyyy hh24:mi:ss"))
8 );
constraint appointment_appdate_ch check (to_char(appdate, "mm/dd/yyyy hh24:mi:ss"))
*
ERROR at line 7:
ORA-00920: invalid relational operator