• SREERAJ. R (8/8/2012)


    Hi,

    As per the business requirement, any SQL script that I make should follow ANSI standard, so that it should successfully execute in both SQL Server 2005 and Oracle.

    Recently I noticed that for flag columns the datatype VARCHAR(5) is used which will store either 'True' or 'False' inorder to make it executable in Oracle also!. Now I think to use a BIT data type, but it seems Oracle doesn't have such a type. Can I use SMALLINT so that 1 or 0 can be stored? Is this type supported in Oracle?

    I would settle for varchar2(1) and store either "T" or "F" so to make it closer to what you have today.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.