将值插入 PostgreSQL 中的列
我想弄清楚如何将相同的值插入到表的整个列中?该表已经存在,并且我有一个空列,我想在其中插入某个值,例如今天的日期。我只找到解释如何将值插入整行的来源。
I am trying to figure out how to insert the same value into the entire column of a table? The table already exists and I have an empty column into which I would like to insert a certain value, for example, today's date. I have only found sources explaining how to insert values into an entire row.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
newValue 也可以是一个表达式。
请参阅http://www.postgresql.org/docs/current/static/ sql-update.html
newValue can also be an expression.
see http://www.postgresql.org/docs/current/static/sql-update.html
我认为我们需要更多信息来理解这个问题,听起来你只是想...
如果你已经在那里获得了数据并且你想更新所有行的该列那么...
I think we need a bit more info to understand the issue, it sounds like you just want...
If you've already got data there and you want to UPDATE that column for all rows then...
我认为您正在尝试更新。
I would think you're trying to UPDATE.