Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Display BOOLEAN as 0/1, not 'TRUE'/'FALSE'

aSystemOverload's profile image aSystemOverload posted 6 days ago in General Permalink

Hey, Can Heidi display boolean values as 0/1, rather than 'TRUE'/'FALSE'. I export a table with boolean values in from Heidi, but all boolean fields are string 'TRUE'/'FALSE' which I can't then re-import into MS SSMS.

glanglois's profile image glanglois posted 3 days ago Permalink

If you're doing it as a SELECT, you can acheive it by using an IF statement.

Here's a basic example:

SELECT IF (ID_Client >= 1000, '1', '0')  
FROM Clients  

Where the second argument determines what happens if the condition is true and the thrid if it's false. That would get you a list of ones and zeros instead of TRUE and FALSE.

I hope that can help.

Please login to leave a reply, or register at first.