Forum Stats

  • 3,873,270 Users
  • 2,266,529 Discussions
  • 7,911,490 Comments

Discussions

New type BOOLEAN

Thomas U.
Thomas U. Member Posts: 1 Blue Ribbon
edited Jun 26, 2018 1:56PM in Database Ideas - Ideas

BOOLEAN is available in PL/SQL but not in SQL.

This request is now referenced as: Enh 28146286 - SUPPORT FOR ISO SQL BOOLEAN DATA TYPE

User259623 -Oracleuser481799Torsten KleiberTom321User_3YK6IZlatko SiroticChandrakaanth RamamurthyManish Chaturvedivinaykumar2Thomas DonathmarkmevansulohmannArpit Jain -OracleCarsten KaftanMarwimRajenBctriebLothar FlatzborneselMartin PreissGeeky NerdmanJagadekaraChris Huntabhinivesh.jainTPD-OpitzRodrigo Jorge DBABPeaslandDBAPatrick Wolf-Oracletop.gunsysassysdbaDeepak Darak -OracleGeert GruwezChristian ErlingerPravin TakpireKayKgaverilluser12192189itshakjaramillWilliam RobertsonApexBineRafiq DInoLNimish GargnohupMarco MischkeShrinathGuser7904656Yvo BreuerErik van Roon3229097trentSven W.BrunoVromanjbosmanKevan Gellingcommi235Zohar Elkayamf93722c2-d788-459e-8f37-51c1fa17950bN.B.FatMartinRdoberkoflerMichaelAtOTNuser622767Richard SmithMarkusHohlochangelo.stramieriUser_FLNLBPeter.NnatalkaDavid Krch-Oracleuser6192574davemmJ.Schnackenberg85441a4b-0fd9-470b-b0b7-3cb88dfbd4f8dirkvanhauteJon Theriault3241488Abhinav B.sensoft32598173259943Andre SantosChris MentenAparna Dutta-Oraclejnicholas330Patrick van DijkDani SchniderMarkus HohlochLukas EderFranck Pachotddf_dba3203870PabloCarmonae58d26b8-48f8-475b-8af4-6b02b4ba7db126038323022681Uwe Küchler [OC]Chris AntogniniAndreas Buckenhoferuser2644554dherzhauLudovicoCaldarace1a20d7-d2a8-4d1d-9045-c86a3690d795user5735795Thomas AreggerErnst LeberTony AndrewsChristian Neumueller-OracleTexasApexDeveloperhaarsebrianraytns42Nikolaus Thielsgudipudi741405Jhonata E. Lamimuser737476309d41b5b-feb5-45ef-b610-4f1e0cac8846omeinuschzefcc9c509d-4092-4a94-97bb-04110fee0d20Menno HoogendijkDirk Mika1c2c328b-f1aa-4fd0-ba81-83a3641d3671David Kyanekuser6807562CharlesM_Daytonyasuo.hondafd8b2e38-8a50-44f7-a1f8-e1086183f51amathguy3041703User910243567Jan Brosowski -OracleDranon3168360RTSelygrejgebalPeter HraškoThorsten KettnerHolgerHJeffrey KempMettemusens2pnoskocormacofpriede5ba3d4a3-ec3d-49d7-8106-a3840412cc64Omar M. SawalhahBEDEuser2781259User_9GEWMDave Schleisuser1537869JazzhopPeter.Lorenzenjudith_21Adricuser4145853user7275562johnnie.billingsSebastien A.Mónica GodoyGerald Venzl-OracleFranky Weber Faustuser488047shachou1434Martin van DonselaarT. GraefSebastianKoellAndrew Moskevitzblessed DBAFilipe M Mendesstefan.dobreUser_VJM2DStew AshtonMarkStewart30116152894830floo_barHolger.de47df569f-3cd7-483e-85b3-ea46b7eaee2auser9355383Evandro Lima-Oraclemathew-butlerStianAtWork3397316KKGMatej D.Mr.T35630031925872mschuApexKim Berg HansenCruise-OracleAhmed Elgamal4570470e-92f7-45c7-930f-aaee1faaedbaAsterix45BerndLAlexiswcgUser_MY1BMgencon1479239sect55devegied2user490439692cfe53a-89db-4f6f-8e92-ad224a05a1ceUser_RA3A5Tatiana.Lutz Lennemann-OracleMike Steder-Oraclepchircopuser643283rkkierUser_CMAKFSentinelNorbertKlUser_P9WRFPierMarknut-JavaNetSamuel NitscheKasparWalteroskarvanrest-OracleChoc CacMike KutzHildoHKGelling292a2bd22-306f-4b12-a87a-8e92c683caa4rafael_gGunabalanUser_DW837Loïc Lefèvre-Oracle06c936d3-6d2f-4be8-b11f-0630eef4a5e937777554be2cd1c-cf01-4d63-9aa6-5a8c42347cf5barakosifd57716b-1e7c-41b0-8a98-830305effe54Efrem Baraldoilmarsk3790794user10067742Gus Sanmartin4135297user13804894141306FamilyGuy81Dejan T.user7923359Diego (SniperCat)amadisGabriel-TVDkempiakOren NakdimonStefan DobredebebusUser_XTYRJ3165636RJAIMES-SVSascha SchäferAnirvan Sarkar-Oracleuser13475974TamaraLaBorde-OracleYannik_F. CASTELAINKarl Greenwood UVUberxBozoDanilo PiazzalungaDrew888Michelle Unser - SRAUser_930JVuser-dym_on_3270226User_E76H8User_J0JBCuser6640078YevonsdstuberJeff Kemp-OracleUser_DU2XKfridooraulk89Matthias K. F. SchulzUser_3HPXPUser_I5DFIUser_1JH88C Elgholmuser12135243User_64G44fac586
298 votes

Under Review - Voting Still Open · Last Updated

«1345678

Comments

  • Lothar Flatz
    Lothar Flatz Member Posts: 687 Silver Badge

    Would make some status fields clearer

    ApexBineMarkusHohloch
  • abhinivesh.jain
    abhinivesh.jain Member Posts: 307 Blue Ribbon
  • TPD-Opitz
    TPD-Opitz Member Posts: 2,465 Silver Trophy
    edited Apr 3, 2015 5:56AM

    It would be good if there was some auto conversion so that the new type integrates into existing applications.

    E.g. lots of applications use a NUMBER(1) field constrained to {0;1} to represent the boolean state. I think this easy to aoutoconvert to the hypothetical boolean type.

    But there are others using a VARCHAR[2] column constraint to some meaningfull words like {'TRUE';'FALSE'}, {'YES';'NO'}, {'ON';'OFF'} or their localized translations.

    Auto conversion should work with those too.

    On the other hand  a converson method would be handy like we have for Dates:

    TO_BOOLEAN(the_legacy_value_to_convert, THE_LEGACY_TRUE_VALUES_AS_CSV_LIST)

    It should look up the (non null) first Parameter in the second parameter and return TRUE when found, FLASE otherwise.

    bye

    TPD

    Mustafa_KALAYCI
  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    Would it be a NUMBER(1) or a VARCHAR2(1)?

  • sysassysdba
    sysassysdba Member Posts: 459 Silver Badge

    Would it be a NUMBER(1) or a VARCHAR2(1)?

    Top, would it be Boolean not NUMBER or Varchar.

    Regards

    William RobertsonMarkusHohlochMarkStewart
  • Nimish Garg
    Nimish Garg Member Posts: 3,185 Gold Trophy

    I vote for this, it would be nice to have boolean as column data type

  • ApexBine
    ApexBine Member Posts: 153 Silver Badge

    People have been asking for it for ages.

    What are the arguments against it, actually?

    Thorsten KettnerMarkStewartamadis
  • Boolean datatypes are typically used for decision making and that is most often done in PL/SQL which already has a boolean datatype.

    So other than in a CASE statement how would a boolean datatype be of any benefit in SQL?

  • ApexBine
    ApexBine Member Posts: 153 Silver Badge

    Boolean datatypes are typically used for decision making and that is most often done in PL/SQL which already has a boolean datatype.

    So other than in a CASE statement how would a boolean datatype be of any benefit in SQL?

    Hi rp0428,

    booleans are not only used in programming, very often they are just part of the data and properties of the objects the data represents. (Typically 'is' or 'has' properties)

    Just look at the real world - haven't you come across all the different efforts to express boolean values inside a table like TPD-Opitz described above?

    Sometimes people even use different representations within the same database

    TPD-OpitzMarkusHohlochMarkStewart