Reposted from: longtang Bay
1.1.1 obtain the first N records
SQL Server: Select Top N * From xtable
ORACLE: Select * From xtable where rownum
DB2: Select * From xtable fetch first n rows only
1.1.2 obtain the current date
SQL Server: Select getdate
The db2 tutorial is: Daily maintenance Summary of IBM DB2 (6 ). 91. How to Create a summary table of DB2?
The overview table function of DB2 is similar to the materialized view of ORACLE!
Syntax:
CREATESUMMARYTABLETABLE_NAMEAS (FULLSELECT )...
For
The db2 tutorial is: Daily maintenance Summary of IBM DB2 (6 ). 91. How to Create a summary table of DB2?The overview table function of DB2 is similar to the materialized view of ORACLE!Syntax:CREATESUMMARYTABLETABLE_NAMEAS (FULLSELECT )...For
with definition and usage-------Part of the content is reproduced and processed by finishing---------------------1.with Understanding and basic usage the WITH statement, in addition to those who first heard of the WITH statement, most people think
BKJIA exclusive Article: First of all, this article is not a detailed list of new features of DB2 9.7. I only list a list that is very important to DBAs or developers.
Online solution Modification
Please refer to Burt's article on online solution
Assuming that the table named T,primary key is an ID, then:1-5000000SELECT t.*From T, (SELECT ID, row_number () over (ORDER by id) as num from T) as T1WHERE t.id = t1.id and T1.num 50000001-100000000SELECT t.*From T, (SELECT ID, row_number () over
Fetch first n rows in db2 and rownum in oracle if you want to obtain the first n rows in db2, you only need to add fetch first n rows only, but there is no fetch in oracle, many people on the Internet say that oracle's rownum select rownum, id, age,
The DB2 tutorial you are looking at is: IBM DB2 Daily Maintenance Summary (vi). 91. How do I create a DB2 summary table?
DB2 's summary table functionality is similar to the materialized view of Oracle!
The syntax is:
Createsummarytabletable_nameas (
100. How do I delete a sequence?Dropsequencesequence_name 101.DB2 the file format that supports importing (import) has?There are: del,asc,ixf,wsf, etc. 102.DB2 the file format that supports exporting (export) has?There are: Del,ixf,wsf and so
Oracle
How to present Oracle's related functions in DB2 (IV.)
Author:ccbzzp
In reality, you may often encounter some of the functions of Oracle in DB2,
Here I simply conclude that there may be many ways in which a function can be found, not all of
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.