用PostgreSQL中的特定值填充表的所有列?

用PostgreSQL中的特定值填充表的所有列?,postgresql,fill,autofill,Postgresql,Fill,Autofill,我有一个表,我想用一个特定的值填充一列 样本表: 它包括一个空的温度列,我想用4.56填充相关列的所有行 +------------+------------------+ |temperature |dt | +------------+------------------+ | |9/15/2007 12:12:12| | |9/15/2007 12:14:16| |

我有一个表,我想用一个特定的值填充一列

样本表: 它包括一个空的温度列,我想用4.56填充相关列的所有行

+------------+------------------+ |temperature |dt | +------------+------------------+ | |9/15/2007 12:12:12| | |9/15/2007 12:14:16| | |9/15/2007 12:16:02| | |9/15/2007 12:18:23| | |9/15/2007 12:21:01| +------------+------------------+ +------------+------------------+ |温度| dt| +------------+------------------+ | |9/15/2007 12:12:12| | |9/15/2007 12:14:16| | |9/15/2007 12:16:02| | |9/15/2007 12:18:23| | |9/15/2007 12:21:01| +------------+------------------+ 结果:

+------------+------------------+ |temperature |dt | +------------+------------------+ | 4.56 |9/15/2007 12:12:12| | 4.56 |9/15/2007 12:14:16| | 4.56 |9/15/2007 12:16:02| | 4.56 |9/15/2007 12:18:23| | 4.56 |9/15/2007 12:21:01| +------------+------------------+ +------------+------------------+ |温度| dt| +------------+------------------+ | 4.56 |9/15/2007 12:12:12| | 4.56 |9/15/2007 12:14:16| | 4.56 |9/15/2007 12:16:02| | 4.56 |9/15/2007 12:18:23| | 4.56 |9/15/2007 12:21:01| +------------+------------------+
update the_table
   set temperature = 4.56;
commit;