[SQL] SQL Developer accessing PostgreSQL
Hello, Is there a way to configure Oracle's SQL Developer to access a PostgreSQL database? Thanks,Jim
Re: [SQL] SQL syntax rowcount value as an extra column in the result set
Thanks for all the dialog on this subject. My "version" was derived from the postgreSQL's .jar file (specifically named "postgresql-8.4-701.jdbc4.jar") that I'm using. When I do the following: select version() I get the following: PostgreSQL 8.3.6 I'm going to check this out. Thanks...Jim -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Thomas Kellerer Sent: Friday, March 26, 2010 3:15 AM To: pgsql-sql@postgresql.org Subject: Re: [SQL] SQL syntax rowcount value as an extra column in the result set Jayadevan M, 26.03.2010 07:56: > Thank you for setting that right. Apologies for not checking version. The orginal poster stated that he is using 8.4, so that solution will work for him. Thomas -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
[SQL] SQL syntax rowcount value as an extra column in the result set
Hello I'm using PostgreSQL (8.4.701) and Java (jdbc, postgresql-8.4-701.jdbc4.jar) to connect to the database. My question is: what is the SQL syntax for PostgreSQL to achieve the following: I want to receive the rowcount along with the rest of a result set. For example, let's say the following query returns select first_name from people; first_name = Mary Sue Joe and the following query returns the value select count(*)as ROWCOUNT from people; ROWCOUNT == 3 3 What I'm looking for is the output as ROWCOUNT , first_name = 3 , Mary 3 , Sue 3 , Joe so I can use JDBC (snip-it) as follows: resultSet.getInt("ROWCOUNT") resultSet.getString("first_name") On a side note, Oracle allows the following syntax to achieve the above: select count(*) over () as ROWCOUNT , first_name from people Thanks,Jim