I was interested, so I did some googling. It seems clear that the SQL
standards don't mention a 'rename column' command, so neither H2 nor
Postgres is wrong (or right!).
A book (SQL Clearly Explained) I came across suggested "ALTER TABLE TEST
RENAME COL1 TO COL2" was "correct", while Mysql is
as per H2 doc, this works fine:
create table TEST (COL1 INT8);
ALTER TABLE TEST ALTER COLUMN COL1 RENAME TO COL2;
however postgresql syntax is:
ALTER TABLE TEST RENAME COLUMN COL1 TO COL2;
Who has wrong syntax, H2 or other db?
--
You received this message because you are subscribed to the