pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedask syntax sql to get length of field
2+ messages / 2 participants
[nested] [flat]
* ask syntax sql to get length of field
@ 2006-04-20 07:37 Mariya Yuniarti <mariya_yuniarti@yahoo.com>
2006-04-20 15:23 ` Re: ask syntax sql to get length of field Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 2+ messages in thread
From: Mariya Yuniarti @ 2006-04-20 07:37 UTC (permalink / raw)
To: pgsql-sql
Here Question :
I have table A with structure :
Number Character(20),
Description Character(50)
I want to get length of field Number (20)
What is syntax sql to get length of field ?
thx
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ask syntax sql to get length of field
2006-04-20 07:37 ask syntax sql to get length of field Mariya Yuniarti <mariya_yuniarti@yahoo.com>
@ 2006-04-20 15:23 ` Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Wolff III @ 2006-04-20 15:23 UTC (permalink / raw)
To: Mariya Yuniarti <mariya_yuniarti@yahoo.com>; +Cc: pgsql-sql
On Thu, Apr 20, 2006 at 00:37:08 -0700,
Mariya Yuniarti <mariya_yuniarti@yahoo.com> wrote:
> Here Question :
>
> I have table A with structure :
>
> Number Character(20),
> Description Character(50)
>
> I want to get length of field Number (20)
>
> What is syntax sql to get length of field ?
Are you looking to get 20 or the length of a particular string in that column?
If you are looking for the maximum length (20), that should be available in
the catalogs. For the string length you can look in the string functions
section of the document. I am not sure whether or not trailing spaces are
counted in char columns. varchar makes more sense if you actually have
variable length strings.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-04-20 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 07:37 ask syntax sql to get length of field Mariya Yuniarti <mariya_yuniarti@yahoo.com>
2006-04-20 15:23 ` Bruno Wolff III <bruno@wolff.to>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox