更改表中的数据:1、更新特定行;

                2、更新所有行。

注意:更新时一定要注意添加上where条件,否则,更新表中所有行数据。

格式: 更新特定行:update table 

                   set table_xxx='aaaaaa'  

                   where table_id='bb';

       更新多行:update table 

                 set table_xxx='aaaaaa', 

                     table_city='cc',

                       ……

                     table_name='dd'

                 where table_id='bb';


示例:update customers  

      set cust_email='1111@126.com'  

      where cust_name='yang' 


要想删除表中的某个列的值,可设置它为NULL(假定表定义允许NULL值)。

update customers  set cust_email='null '  where cust_name='yang' 

NULL用来去除cust_email列中的值,NULL表示没有值。而字符串‘’表示一个值。