I am working with database in which I have appointment table. With Two columns
ApptDate ApptTime
9/26/21 9:00 AM
9/25/20 1:00 PM
I want to drop the ApptTime column after making ApptDate Columns as ApptDateTime column. I have tried concatnate but I can't figure out, how can I change datatype of AppDate column to DATETIME data type and update all the values simultaneously. I tried following:
ALTER SESSION SET nls_date_format = 'DD-MON-YYYY hh24:mi'
UPDATE Appointment
SET ApptDate = ApptDate ||' ' ||ApptTime;
ALTER TABLE Appointment
MODIFY(
ApptDate DATE
);
But I got error that Data type can be changed of only Empty Table. Kindly suggest.