I'm having trouble setting the computed column as not null
.
I want to reach C001
, C002...
etc. and at the same time set it as not null
.
I read on the forum that this can be achieved using the default value of 0 for NULL values.
For example, ISNULL(Price + Taxes, 0)
I tried to apply this formula:
('C'+right('000'+CONVERT([varchar](3),[ID],(0)),(3)))
But that did not work. Can someone tell me what I am missing?
ALTER CreditCard accountNo AS ISNULL('C'+right('000'+CONVERT([varchar](3),[idCreditCard],(0)),(3)),0)
source share