X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0E7CCDB6A4; Tue, 1 Nov 2005 10:28:25 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63906-05; Tue, 1 Nov 2005 14:28:21 +0000 (GMT) Received: from www26a.your-server.co.za (www26a.your-server.co.za [196.7.147.26]) by svr1.postgresql.org (Postfix) with ESMTP id 54807DB69D; Tue, 1 Nov 2005 10:28:20 -0400 (AST) Received: from wbs-196-2-116-105.wbs.co.za ([196.2.116.105] helo=[127.0.0.1]) by www26a.your-server.co.za with esmtp (Exim 4.51) id 1EWx7Z-0005we-Lz; Tue, 01 Nov 2005 16:28:23 +0200 Message-ID: <43677B35.6010005@lani.co.za> Date: Tue, 01 Nov 2005 16:27:01 +0200 From: L van der Walt Organization: lanivdw@global.co.za User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org, pgsql-general@postgresql.org Subject: A Not Join Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Clear (ClamAV 0.87/1151/Mon Oct 31 20:34:04 2005) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.052 required=5 tests=[AWL=0.052] X-Spam-Score: 0.052 X-Spam-Level: X-Archive-Number: 200511/23 X-Sequence-Number: 86167 I have three table: Users - Contains username, ID etc... Permissions - A permission name and ID Link up table - The user.id and permission.id If a user.id and a permission.id row exists in the linkuptable the user have that permission granted. With the statement below I can see the permissions a user have. SELECT users.username, permissions.name FROM users INNER JOIN linkuptable ON (users.id = linkuptable.userid) INNER JOIN permissions ON (permissions.id = linkuptable.permissionid) WHERE users.username = 'DummyUser' How do I see the permissions that user DON'T have with a fast SQL statement. Thus, a NOT the statement for the above SQL statement Regards Lani