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 -> Re: select * from <table_name> where 1=2

Re: select * from <table_name> where 1=2

From: J. Wegener NOSPAM <xjw_at_xdde.xdk>
Date: Tue, 6 Jul 1999 08:30:07 +0200
Message-ID: <7ls7mt$qah$1@news101.telia.com>


Anurag Minocha <anurag_at_synergy-infotech.com> skrev i en nyhedsmeddelelse:37817800.E9BD1A89_at_synergy-infotech.com...
> Hi,
> I am working on a java application and i have to caplture the table
> structure if the tables in my database by using select * from
> <tablename> where 1=2. But this is a fulltable scan.Is there any other
> method by which i can capture the table structures without doing a full
> table scan.I tried select * from <table_name> where rownum= -1.when i
> tried this with set timing on .This takes more time than select ...1=2..
> Please suggest some way.
>
> anurag

I cannot follow you. The logical predicate "1=2" will obviously not select any rows and should definately not cause a full table scan.What kind of Java development environment are you using?

Another way would be to query the data dictionary view USER_TAB_COLUMNS for the structure of a table.

Cheers,
Johan Received on Tue Jul 06 1999 - 01:30:07 CDT

Original text of this message

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