X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 19D35D1BA48 for ; Mon, 1 Mar 2004 02:05:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46652-10 for ; Sun, 29 Feb 2004 22:05:44 -0400 (AST) Received: from filter.mimos.my (filter.mimos.my [192.228.137.70]) by svr1.postgresql.org (Postfix) with ESMTP id AA5F1D1B83D for ; Sun, 29 Feb 2004 22:05:39 -0400 (AST) Received: from ew.mimos.my (localhost.localdomain [127.0.0.1]) by filter.mimos.my (8.11.6/8.11.6) with ESMTP id i2125gF31270 for ; Mon, 1 Mar 2004 10:05:42 +0800 Received: from mimos.my (sol-wel197.nat.mimos.my [10.1.23.197]) by ew.mimos.my (8.12.8p2/8.12.8) with ESMTP id i2125egg031648 for ; Mon, 1 Mar 2004 10:05:41 +0800 (MYT) (envelope-from wahab@mimos.my) Message-ID: <40429AA1.4060905@mimos.my> Date: Mon, 01 Mar 2004 10:06:25 +0800 From: Abdul Wahab Dahalan User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: How to get Rows Count Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/405 X-Sequence-Number: 17095 > > >a b d c >01 02 b * >01 02 a * >02 03 >02 04 b * >02 04 a * >03 05 >04 06 > If I've a table like above, how do I make a query to get rows count that doesnt have '*' in it. Can we have other queries than this : Select count(c) from tablename where c !='*'; or Select count(c) from tablename where c <> '*';