插入单列列给单列添加数据

插入单列列给单列添加数据

插入单列列给单列添加数据

--添加单列
alter table 读者 add age int

--删除单列列名
alter table 读者 drop column age

--插入单行数据不是使用insert而是使用,update
update 读者 set age = 18  where 读者编号 = 0011 
update 读者 set age = 19  where 读者编号 = 0013 
update 读者 set age = 20  where 读者编号 = 0014 
update 读者 set age = 21  where 读者编号 = 0015 
update 读者 set age = 28  where 读者编号 = 0016 

你可能感兴趣的:(数据库)