A very naive question. I need to store currency in the database. Both the value and the code. To solve this, do people generally make 2 columns, one storing the value and ot
Some databases have a Money type, which can be used to store the value. However, if you want to store a code (do you mean dollars, euro's etc?) then you would need to use a second column.
Update: PostgreSQL does have a money type, although it looks like it would only support one type of currency so it still does not really meet your needs.