desc command in jdbc

desc command in jdbc

Post by Bart LEBOEU » Fri, 14 Jan 2000 04:00:00



Hi,

   How can I do the "DESC tablename " sqlplus command in JDBC ???

  thanks,
  Bart

 
 
 

desc command in jdbc

Post by Joseph Weinstei » Sat, 15 Jan 2000 04:00:00



> Hi,
>    How can I do the "DESC tablename " sqlplus command in JDBC ???
>   thanks,
>   Bart

You can't directly do a 'DESC' in JDBC, because it's a SQL-PLUS
command, which the SQL-PLUS client converts to a SQL query.
You need to find out the actual SQL that SQL-PLUS sends to the DBMS
in response to the DESC command, then run that. Alternately you could
use DatabaseMetaData calls to determine the same info for the particular
table.
Joe

--

PS: Folks: BEA WebLogic is in S.F., and now has some entry-level positions for
people who want to work with Java and E-Commerce infrastructure products. Send

--------------------------------------------------------------------------------
                    The Weblogic Application Server from BEA
         JavaWorld Editor's Choice Award: Best Web Application Server
  Java Developer's Journal Editor's Choice Award: Best Web Application Server
     Crossroads A-List Award: Rapid Application Development Tools for Java
Intelligent Enterprise RealWare: Best Application Using a Component Architecture
               http://weblogic.beasys.com/press/awards/index.htm

 
 
 

1. ORDER BY DESC returning ASC not DESC !?

Hi,

Any ideas why a query with ORDER BY DESC in it should return data in
ascending order when I specifically asked for descending ? This is really

CREATE PROCEDURE [ReplicateData] AS



DROP TABLE Wordtracker_UseForQuerying.dbo.tblCountPhrases

BEGIN TRAN

SELECT IDENTITY(int, 1,1) AS LineNos, SearchPhrase, CountPhrase,

INTO Wordtracker_UseForQuerying.dbo.tblCountPhrases
FROM WordTracker.dbo.tblCountPhrases
ORDER BY CountPhrase DESC

-- Create indexes so that the five keyword report will be quicker to execute

CREATE
  INDEX [idxCountPhrase] ON
[Wordtracker_UseForQuerying].[dbo].[tblCountPhrases] ([CountPhrase])

CREATE
  INDEX [idxSearchPhrase] ON
[Wordtracker_UseForQuerying].[dbo].[tblCountPhrases] ([SearchPhrase])

COMMIT TRAN

2. FMP7 Wish: Value List Arithmetic

3. Core dump in sqlplus for desc command

4. Independent Consultants

5. DESC Command

6. Select specific values

7. DESC command in Informix DB

8. Using functions in views and procedures

9. jdbc oracle and desc statements

10. JDBC connection param(s) for SET commands?

11. JDBC not working with tomcat 4 / works on command line

12. jdbc-odbc problem with Java execute Command

13. jdbc / insert command