3
I’m studying the Postgresql comic book for a recent book I acquired. When trying to change a tebela based on the command I learned in the book an error occurred, I used exactly the same command written in the book without change. I am trying to change an int type field to timestamp type but the following error occurs
--table change with int column change to timestamp type
alter table commissions alter column data_payment type timestamp using data_payment_timestamp;
Obs: in the book is written time_payment_timestamp. Timestamp is a type in SQL to store date and time however with "timestamp" stands as part of the table name. I removed the "" and I left a separate timestamp from the column name because I thought it was a book error but it didn’t work because it still doesn’t work. How to fix this?
the error occurring below:
LINE 1: ...ata_payment type timestamp using data_payment timestamp; ^ SQL state: 42601 Character: 87