oracle 数据更新讲解

(1) 更新一个列:update T_Person set Age=30
(2) 更新多个列:update T_Person set Age=30,Name=’Tom’

(3) 更新一部分数据:update T_Person set Age=30 where Name=’Tom’,用where语句表示只更新Name是’Tom’的行,注意SQL中等于判断用单个=,而不是==。

(4) where中还可以使用复杂的逻辑判断:
update T_Person set Age=30 where Name=’Tom’ or Age<25. or相当于C#中的||(或者)。

(5) where中可以使用的其他逻辑运算符是:or,and,not,<,>,>=,<=,!=(或< >)等。

原文地址:http://bbs.delit.cn/thread-156-1-1.html

转载请注明出处:

撰写人:度量科技http://www.delit.cn