In my database, 1 is used to represent true and 0 to represent false. In my column, I was now wondering if anyone can help me write a query that displays if the value is 1, displays true, if it is 0, displays false ?.
Try using case
case
select case when col = 1 then 'true' when col = 0 then 'false' else 'NN' end as val
select case when your_bool_column = 1 then 'true' else 'false' end as bool_col from your_table
Source: https://habr.com/ru/post/953302/More articles:MySQL WHERE, LIMIT and pagination - mysqlArray of Fortran Extended Objects - oopJackson serializes only interface methods - javaHow height: does auto work in HTML and CSS? - htmlHow can I list all database triggers in sqlite? - sqliteMatlab The original equivalent in R - rEpiServer how to get the URL of a link to a specific page? - episerverHow to export csv from mysql utf8 - phphow to hide / show ng-grid column outside? - angularjsCouchdb - 100% CPU Usage - couchdbAll Articles