Some difference between mysql & oracle
1.
create table TEST
(
num1 number(10),
num2 number(10),
num3 number(10)
)
insert into TEST values(2,4,2).
update TESTHUA set num1=num1+2,num2=num2+8,num3=num2/num1;
select * from TEST
oracle's result:
4,12,2
when oracle execute num3,the value of num1 and num2 didn't change.
mysql's result:
4,12,3
when mysql execute num3,the value of num1 and num2 changed already.
num1 early than num2 because num1's position is bofore num2
It means that oracle update the field data at the same time but
the mysql not,It update the field data behind the "set" by the sequence .
2.special character: oracle: '
mysql: '
3.null phenomenon:
in mysql: null is different from '';
insert into test(ID) values(1);
insert into test(ID,name) values(2,'');
execute:
select * from test where name is null; The reuslt is only 1.
select * from test where name=''; The result is 2.
in oracle: '' is same as null;
select * from test where name is null; The reuslt is 1,2.
select * from test where name=''; No result;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/545828/viewspace-975780/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Difference between cursor and a ref cursor
- What is the difference between a Homemaker and a Housewife?
- Difference Between Arraylist And Vector : Core Java Interview Collection QuestionJavaView
- What is the difference between Mysql InnoDB B+ tree index and hash index? Why does MongoDB use B-tree?MySqlIndexMongoDB
- Difference between Microsoft Dynamics 365 WEB API, Organization Service and Organization Data ServicROSWebAPI
- The SQL vs NoSQL Difference: MySQL vs MongoDBMySqlMongoDB
- 【Oracle SQL】months_between與trunc函式OracleSQL函式
- MySQL中BETWEEN子句的用法詳解MySql
- JavaScript some()JavaScript
- What is the difference Put and Post and Get?
- difference with PerlApp 7.0 and PerlApp 6.0APP
- LeetCode 389. Find the DifferenceLeetCode
- some settings for spacemacs golangMacGolang
- Some good websites for C++GoWebC++
- RUST Some None 和OKRustNone
- Some notes about patch workflows
- Some ideas About ‘invisible bug‘Idea
- Oracle 轉MySqlOracleMySql
- How to review diffs between commitsViewMIT
- [Oracle-> MySQL] Oracle通過dblink連線MySQL--Oracle 19c連線到MySQL 5.7OracleMySql
- JS中some、every、map、filterJSFilter
- Some 困難的數論
- some notes about distributed workflows in GitGit
- Cannot dlopen some GPU libraries.GPU
- SAP Retail Differences Between Articles and MaterialsAI
- 1344. Angle Between Hands of a Clock
- mysql 資料庫無法啟動Ignoring the redo log due to missing MLOG_CHECKPOINT betweenMySql資料庫
- [LeetCode] 2903. Find Indices With Index and Value Difference ILeetCodeIndex
- Between validator常用驗證規則
- Oracle和Mysql遞迴OracleMySql遞迴
- Oracle MYSQL PG體系OracleMySql
- Oracle MySQL PG選型OracleMySql
- Oracle MySQL PG主從OracleMySql
- Github錯誤之failed to push some refs toGithubAI
- Swift 5.7 中的 any 和 some (譯)Swift
- In-depth analysis of the comparison between AT and XA of distributed transactions
- MySQL和Oracle的區別MySqlOracle
- mysql與Oracle的區別MySqlOracle
- Oracle和MySQL的區別OracleMySql