I have a requirement where I need to change the column data type to BIT. As of now its in NUMBER. I know that Oracle does not support BIT data types, just curious to know if there is any alternatives to achieve this.
And why do you need a "bit" data type? If you are looking for a "boolean" type - Oracle does not have that either. So you need to stay with number
user330315
–
user330315
2016-09-14 06:47:10 +00:00
CommentedSep 14, 2016 at 6:47
Actually we have an application called Guidewire which is using Oracle 12c as a backend. We are performing an upgrade task from Oracle 11g to 12c. So, the client requested to modify one of the columns to BIT which was previously NUMBER. We thought of changing it to CHAR(1) to make it equivalent to BIT. But i guess it won't work
Surely the answer when someone asks you to do something impossible (you can't convert a column to bit since Oracle does not have a bit type) is to ask the client some followup questions. A char(1) or a raw(1) might be kind of sort of like a bit in SQL Server but neither is really equivalent. I'd ask the client what problem they are trying to solve and why they think a non-existent data type would solve that problem.
Thanks for your suggestions and advises. As I mentioned I tried with CHAR(1) and the application accepted the change for the particular column. I don't know how it worked but now the server is getting started.
numberbitsince Oracle does not have abittype) is to ask the client some followup questions. Achar(1)or araw(1)might be kind of sort of like abitin SQL Server but neither is really equivalent. I'd ask the client what problem they are trying to solve and why they think a non-existent data type would solve that problem.