SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: postgresql

  1. #1
    SitePoint Guru johnjohn2's Avatar
    Join Date
    Apr 2004
    Location
    here
    Posts
    746
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    postgresql

    Is there anyway to specify the number of decimal places that a numeric field can hold in postgresql? I want to setup a currency field with only 2 decimal places.

  2. #2
    SitePoint Enthusiast omerie63's Avatar
    Join Date
    Jul 2004
    Location
    WISCONSIN
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can't you do something like this?

    CREATE TABLE myTable(
    myField float8(2)
    );

  3. #3
    SitePoint Guru johnjohn2's Avatar
    Join Date
    Apr 2004
    Location
    here
    Posts
    746
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the help.

    actually on a numeric field type I found out you can specify the length and the amount of decimals as well.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •