简体   繁体   English

更改表的插入值

[英]Alter the table inserted value

disease_category disease_category

cat_id      cat_name            sub_id          sub_name 

1         Infect Disease           1             head   
1         Infect Disease           2            development de

how to alter the sub_name development de into development delay? 如何将sub_name开发de更改为开发延迟?

how to insert new column C_id as primary key & auto_increment ? 如何插入新列C_id作为primary keyauto_increment

how to alter the sub_name development de into development delay? 如何将sub_name开发de更改为开发延迟?

Answer :You need to use update query. :您需要使用更新查询。

update tablename
set sub_name='development delay'
where sub_name='development de'

2nd question: 第二个问题:

ALTER TABLE tablename ADD c_id INT PRIMARY KEY AUTO_INCREMENT;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM