imay commented on issue #4782:
URL: 
https://github.com/apache/incubator-doris/issues/4782#issuecomment-716936716


   > The uniq-model documentation had a syntax error in unique key('user_id', 
'username')
   
   If you want to change username, you should create a table like 
   
   ```
   CREATE TABLE `test_unique` (
       user_id int,
       username varchar(64)
   ) ENGINE=OLAP
   UNIQUE KEY(`user_id`)
   DISTRIBUTED BY HASH(`user_id`) BUCKETS 1
   PROPERTIES (
   "replication_num" = "1"
   );
   ```
   insert one row by "insert into test_unique values (1, "hello");"
   
   Then you can change 'username' by insert a new row to overwrite the old one, 
such as "insert into test_unique values (1, "world");"
   Then the user name is changed to "world"
   
   > I am going to submit a request to add update table support.
   
   I think supporing update is complicated operation. Can you give us some 
detail about your change?
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to