I'm trying to implement

NOT EXIST (SELECT 'NEXT' FROM ... )

in python sqlalchemy and is having trouble figure out the SELECT 'NEXT' syntax. I did find there is a next_value() in sql next_value

Ive tried

~exist(next_value()).where(...)

but next_value() is not defined. What may the proper syntax be?

Thanks in advance!

有帮助吗?

解决方案

Try this:

from sqlalchemy.sql import func
# ...    
~exist(func.next_value()).where(...)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top