简体   繁体   中英

SQLAlchemy MSSQL-IIF

I could not find anything specific about this, but does SQL-Alchemy support the MSSQL-IIF function ?

Inside the docs I could not find any info for this and I guess I have to use the case-when block or a simple if instead?

It seems that SQLAlchemy does not support IIF for SqlServer. The function is equal to the IF Function in MySQL but SqlAlchemy does not recognize this difference. Instead a case when then block can be used as an alternative to func.IF .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM