patternMinor
H2 ALTER TABLE ADD COLUMN BEFORE/AFTER
Viewed 0 times
aftercolumnbeforealtertableadd
Problem
According to H2 syntax documentation available here I should be able to execute a query like:
However apparently only this query works:
Is it a mistake in the documentation or am I missing something?
The BEFORE and AFTER parameters would be useful to me.
ALTER TABLE EMPLOYEE ADD COLUMN SECOND_NAME VARCHAR (124) AFTER FIRST_NAME;However apparently only this query works:
ALTER TABLE EMPLOYEE ADD COLUMN SECOND_NAME VARCHAR (124);Is it a mistake in the documentation or am I missing something?
The BEFORE and AFTER parameters would be useful to me.
Solution
It works for me. The H2 change log says it was added in version 1.3.171. Here is the original bug
What didn't work for me was having multiple
alter table credentials add column domain VARCHAR(255) after credentialType;What didn't work for me was having multiple
adds inside one alter.Code Snippets
alter table credentials add column domain VARCHAR(255) after credentialType;Context
StackExchange Database Administrators Q#44348, answer score: 2
Revisions (0)
No revisions yet.