0
ALTER TABLE user_login ALTER COLUMN dob date;

Is this correct query in psql to modify the data type of the column?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Pari Venthan
  • 59
  • 1
  • 1
  • 8

1 Answers1

0

No, you need to include TYPE. It should be

ALTER TABLE user_login ALTER COLUMN dob TYPE date

See the documentation. You're probably confused with ADD COLUMN where you can omit the TYPE.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109