Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要检查表中的行数,如果计数大于 1,我需要运行更新查询。有什么方法可以在不使用 teradata sql 助手中的 bteq 脚本的情况下做到这一点?顺序应该如下所示
尝试这个:
UPDATE dbname.tablename SET <column>=<value> WHERE (SELECT COUNT(*) FROM dbname.tablename) >0;
谢谢