开发者社区> 问答> 正文

单个字段的collation可以修改吗

单个字段的collation可以修改吗

本问题来自云栖社区【PostgreSQL技术进阶社群】。https://yq.aliyun.com/articles/690084 点击链接欢迎加入社区大社群。

展开
收起
游客886 2019-04-19 09:55:03 1578 0
1 条回答
写回答
取消 提交回答
  • 使用脚本修改吧,界面也可以 脚本如下: Alter table [表名] Alter column [列名] [列类型] [NOT NULL或者 NULL]  alter table 脚本很丰富,可以查看MS SQL的帮助,新手做baidu任务,给个满意吧 ALTER TABLE [ database_name . [ schema_name ] . | schema_name . ] table_name {  ALTER COLUMN column_name  {  [ type_schema_name. ] type_name [ ( { precision [ , scale ]  | max | xml_schema_collection } ) ]  [ COLLATE collation_name ]  [ NULL | NOT NULL ]  | {ADD | DROP }  { ROWGUIDCOL | PERSISTED | NOT FOR REPLICATION | SPARSE }  }  | [ WITH { CHECK | NOCHECK } ]   | ADD  {  <column_definition>  | <computed_column_definition>  | <table_constraint>  | <column_set_definition>  } [ ,...n ]   | DROP  {  [ CONSTRAINT ] constraint_name  [ WITH ( <drop_clustered_constraint_option> [ ,...n ] ) ]  | COLUMN column_name  } [ ,...n ]   | [ WITH { CHECK | NOCHECK } ] { CHECK | NOCHECK } CONSTRAINT  { ALL | constraint_name [ ,...n ] }   | { ENABLE | DISABLE } TRIGGER  { ALL | trigger_name [ ,...n ] }   | { ENABLE | DISABLE } CHANGE_TRACKING  [ WITH ( TRACK_COLUMNS_UPDATED = { ON | OFF } ) ]   | SWITCH [ PARTITION source_partition_number_expression ]  TO target_table  [ PARTITION target_partition_number_expression ]   | SET ( FILESTREAM_ON = { partition_scheme_name | filegroup |  "default" | "NULL" } )   | REBUILD  [ [PARTITION = ALL]  [ WITH ( <rebuild_option> [ ,...n ] ) ]  | [ PARTITION = partition_number  [ WITH ( <single_partition_rebuild_option> [ ,...n ] ) ]  ]  ]   | (<table_option>) } [ ; ]  <column_set_definition> ::=  column_set_name XML COLUMN_SET FOR ALL_SPARSE_COLUMNS  <drop_clustered_constraint_option> ::=  {  MAXDOP = max_degree_of_parallelism  | ONLINE = {ON | OFF }  | MOVE TO { partition_scheme_name ( column_name ) | filegroup  | "default" }  } <table_option> ::=  {  SET ( LOCK_ESCALATION = { AUTO | TABLE | DISABLE } )  }  <single_partition_rebuild__option> ::= {  SORT_IN_TEMPDB = { ON | OFF }  | MAXDOP = max_degree_of_parallelism  | DATA_COMPRESSION = { NONE | ROW | PAGE} } }
    

    答案来源于网络,供您参考

    2019-09-18 15:02:57
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载