1 2 Previous Next 19 Replies Latest reply: Aug 30, 2011 7:42 AM by Paulie Go to original post RSS
      • 15. Re: Conditional Constraint
        Paulie
        >
        alter table pensioner add cniic_1 gnerated always as (
        case when status=1 then cnic else null end
        ) virtual
        ;
        Very similar functionality to the "COMPUTED BY" syntax which Interbase has had for at
        least 15 years. I think I prefer the original name.


        Paul...
        Jonathan Lewis
        • 16. Re: Conditional Constraint
          malhi
          Thanks a lot.
          • 17. Re: Conditional Constraint
            Jonathan Lewis
            P. Forstmann wrote:

            Is it only possible with 11g thanks to virtual column ?
            I can't think of a way to do it without virtual columns.
            PS: there is a typo in first statement (it should be "generated").
            Thanks for highlighting that - now corrected.

            Regards
            Jonathan Lewis
            • 18. Re: Conditional Constraint
              Jonathan Lewis
              Paulie wrote:

              Very similar functionality to the "COMPUTED BY" syntax which Interbase has had for at
              least 15 years. I think I prefer the original name.
              Better late than never (usually).
              There are still half a dozen "obvious" features that SQL Server has had for years that I'm waiting for in Oracle.

              Regards
              Jonathan Lewis
              • 19. Re: Conditional Constraint
                Paulie
                >

                Very similar functionality to the "COMPUTED BY" syntax which Interbase has had for at
                least 15 years. I think I prefer the original name.
                Better late than never (usually).
                There are still half a dozen "obvious" features that SQL Server has had for years that I'm waiting for in Oracle.
                Such as? Top 10? I have to look at SQL Server for a project shortly - I'd like to know what I'm in
                for - would you have a recommendation for authors the equivalent of Tom Kyte for MS SQL Server?


                TIA and rgs,


                Paul...
                Jonathan Lewis
                1 2 Previous Next