You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "xtern (via GitHub)" <gi...@apache.org> on 2023/05/29 07:26:33 UTC

[GitHub] [ignite-3] xtern commented on pull request #2105: IGNITE-19407 Sql. Introduce DDL command for ALTER COLUMN TYPE.

xtern commented on PR #2105:
URL: https://github.com/apache/ignite-3/pull/2105#issuecomment-1566684207

   Maybe you don't quite understand what exactly has changed.
   
   The standard SQL syntax is as follows:
   ```
   ALTER TABLE <table_name> ALTER COLUMN <col_name> <action>
   <action> ::= SET DATA TYPE <new_type> | SET NOT NULL | SET DEFAULT <default value>;
   ```
   For example, it doesn't allow you to change the type and add NOT NULL constraint at the same time: `ALTER COLUMN SET DATA TYPE INT NOT NULL` - will not work.
   You have to drop NOT NULL contraint separately and that makes sense.
   
   Our previous syntax allows you to change the data type and add a NOT NULL constraint, but it does not allow you to change the type and remove NOT NULL, for example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org