Tim Landscheidt <t...@tim-landscheidt.de> writes: > Jerrel Kemper <jer...@s-wise.nl> wrote: >> How can I have the same result set as above
>> Name >> 001 >> 01 >> 1 >> with the name field defined as character varying. > Ah! Your excentric formatting and the reference to "serial" > had me wondering if the indentation had any meaning. You can > select the rows where the "Name" field is numerically equal > to 1 by casting it to an integer and then comparing it to 1, > i. e.: > | SELECT Name FROM Test WHERE Name::INT = 1; But note that this is going to throw an error if there are any table rows where the name field *doesn't* contain a valid integer. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql