oracle 更新表

前端之家收集整理的这篇文章主要介绍了oracle 更新表前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

更改表中的数据: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表示没有值。而字符串‘’表示一个值。

原文链接:https://www.f2er.com/oracle/209451.html

猜你在找的Oracle相关文章