Is there a way to return an int value for a boolean field in a sql select statement?
Tell me more
×
Database Administrators Stack Exchange is a question and answer site for
database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
|
|
I think this is not SQL Server. Maybe PostgreSQL? Try this
|
|||
|
|
|
If that is really a boolean column, you can do this:
that way you can also return other values than 1/0 if you need to. |
||||
|
|
