Category Archives: Oracle

exp / imp some table in Oracle

How can I export / Import some table in Oracle on command prompt

C:\Documents and Settings\david>exp ods0_mart_postpaid/ods0_mart_postpaid@cognos file=dim_region.dmp tables=dim_region log=dim_region.log

Export: Release 10.2.0.1.0 – Production on Mon Jul 5 17:12:42 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.

Continue reading

Advertisements

Limit the number of rows in DB

How can I limit the number of rows in DB2, MySQL, Oracle, SQL Server

in Oracle:
SELECT * FROM Table_Name where rownum <= 5

in DB2:
SELECT * FROM Table_Name fetch first 5 rows only

in MySQL:
SELECT * FROM Table_Name limit 5

in SQL Server:
SELECT TOP 5 * from Table_Name

hopefully useful… 🙂