nulls in sql and jdbc

Поиск
Список
Период
Сортировка
От J Joubert
Тема nulls in sql and jdbc
Дата
Msg-id 1066571020.3f92950cd7df4@bach.sun.ac.za
обсуждение исходный текст
Ответы Re: nulls in sql and jdbc
Список pgsql-jdbc
How exactly do I use nulls in sql and java?

What I mean is, when I want a column in my database to be set to null, can I
just use
  prepStmt.setString(1, null)
and would this work for setting columns of any type?

Conversely, for reading values in that are a null in sql, could I for example
say
  String str = resltSet.getString("columnName");
  if (str.equals(null))
  {
    ....
  }
and again, is this valid for any type in java or sql?



_______________________________________________________________________
All the good things in life are either illegal, immoral or fattening.


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

Предыдущее
От: Ashwin Kutty
Дата:
Сообщение: Setting up DSPACE for Postgres access
Следующее
От: Marcin Jekot
Дата:
Сообщение: Re: nulls in sql and jdbc