Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> A few simple Oracle questions

A few simple Oracle questions

From: Mark W. Eaton <eaton_at_best.com>
Date: 1998/04/01
Message-ID: <35232EAE.83802664@best.com>#1/1

Our organization is relatively new to Oracle but fairly seasoned with SQL Server development. We have a few questions we need to understand to make the transition as quickly as possible. Please respond directly via email as I do not read this newsgroup regularly,

Sincerely,
Mark Eaton
eaton_at_best.com



SQL*Plus related

How do I tell the Server to return only a fixed number of rows in response to a query.
In isql (Sybase) I would say
set rowcount 10
select fld1 from table1 where fld2 > 100 This would return the first 10 rows that fulfilled the condition. How do I achieve the same in SQL*Plus. There does not seem any environment variable that I can set.

OCI related

OCIStmntExecute( ) returns the status of executing a SQL command. Is there a call to find the number of result rows before doing a fetch ? ( equivalent to a Sybase DBCOUNT () ) which would facilitate doing a single memory allocation for storing the results

Oracle Database Server - Datatypes related

User defined types in Oracle refer to composite fields. In Sybase they are more like typedefs in C/C++ e.g I would define a user defined type ut_zip as char(6) This way whenever I had addresses the zip field would be of type ut_zip. This facilitated a single point of change to the zip fields and also maintenance / searching the database for zip fields. How can I achieve the same in Oracle ?
Received on Wed Apr 01 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US