How would I store little key-Nr to text lists?

Поиск
Список
Период
Сортировка
От Andreas
Тема How would I store little key-Nr to text lists?
Дата
Msg-id 4C3827E3.3080408@gmx.net
обсуждение исходный текст
Ответы Re: How would I store little key-Nr to text lists?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-sql
  Hi

how would I store little key-Nr  to  text  lists?
Like e.g.

colors
1  red
2  green
3  blue

Maybe I later also need to add  4 yellow?

Obviously the numbers are used for foreign keys in data tables and the 
texts appear in selects.
On the other hand users should chose from listboxes in an application so 
I need to be able to read the (key, ext) tupels.

For now I use 2 column tables that in selects get joined to a data table.

Is there a more clever way ?


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Davor J."
Дата:
Сообщение: Re: Well-formed SQL check in postgres?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: How would I store little key-Nr to text lists?