Basic differences between oracle and informix

Source: Internet
Author: User
Tags informix

Basic differences between oracle and informix 1: View tablespaces

Selectb. file_name physical file name, B. tablespace_name tablespace, B. bytes/1024/1024 size M, (B. bytes-sum (nvl (. bytes, 0)/1024/1024 used M, substr (B. bytes-sum (nvl (. bytes, 0)/(B. bytes) * 100,1, 5) utilization from dba_free_space a, dba_data_files bwhere. file_id = B. file_idgroup by B. tablespace_name, B. file_name, B. bytesorder by B. tablespace_name

 

2: When oracleselect into is returned, you can use count (*) or max to avoid errors. 3: oracle executes a stored procedure by directly calling the stored procedure name. informix requires call or execute procedureinformix to call a call. If an error occurs, a general error is prompted. Execute prompts specific error 4: The informix Update statement is Update tablename set (Field 1, Field 2) = (value1, value2 ); oracle updates Set field 1 = value1 and Field 2 = value2 5: The value assignment statement of informix is let _ TimeConfig = 0, while the value assignment statement of oracle is __timeconfig: = 0; 6: informix can be called directly in the stored procedure using exists to determine whether or not it exists, not just in the select statement.
If exists (select 1 from gspmajor where majorid = M_MajorID) thenlet _ IsGSPSHeet = 1; end iforacle is not applicable to oracle, which generally uses count to judge

 

7. informix can directly create temporary tables during storage
Create temp table t_SumFeeInfo1 (sumMemDiscRate dec (), -- VIP card discount rate sumAllocateRate dec (), -- discount fee sharing sumVipDDisc dec (), -- member daily discount rate ), -- Membership day discount share ratio sumMaterialFee dec (), -- energy material usage fee sumshopext0000dec (), -- store Extension fee sumTotalYearFee dec ), -- Annual Fee summary sumGuarantyAmt dec () -- deposit) with no log;

 

Or directly
select A.a1,A.a2 into  temp tmp_mallccsheetashopgoods with no log;

 

If oracle is in the stored procedure, it needs to call
Execute immediate 'Create global temporary table tmp_orderdif (GoodsID int not null, -- item code DiffQty dec () default 0 not null -- acceptance difference); drop table tmp_orderdif ';

 


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.