I am studying PostgreSQL DB for a recent book I purchased. When trying to change a tab 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 a field type int to type timestamp but the following error occurs
- change in table with column change type int to type timestamp
alter table commissions alter column data_payment type timestamp using data_pagamento_timestamp;
obs: in the book is written date_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 left timestamp separate from the column name because I thought this was a book error but it did not work because it still does not work. How do I fix this?
The error that occurs below:
LINE 1: ... ata_payment type timestamp using data_payment timestamp; ^ SQL state: 42601 Character: 87