Results 1 to 4 of 4

Thread: Custom Error message

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Answers
    2

    Custom Error message

    What would you use to place a not null constraint on a column? If the column is left blank on insertion, it should display a custom error message.

    1. Rule
    2. CHECK Contstraint
    3. Triggers
    4. Alter the table so that the column does not allow null


  2. #2
    Junior Member
    Join Date
    Oct 2007
    Answers
    2

    Re: Custom Error message

    What would you use to place a not null constraint on a column? If the column is left blank on insertion, it should display a custom error message.

    1. Rule
    2. CHECK Contstraint
    3. Triggers
    4. Alter the table so that the column does not allow null[/QUOTE]


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Custom Error message

    The best thing to do is to add a NOT NULL constraint on the column.


  4. #4
    Junior Member
    Join Date
    Aug 2007
    Answers
    1

    Re: Custom Error message

    debasisdas,

    How do you then display a custom error message?

    If you check for null in a trigger you can raise it with raiseerror(), though not sure if it is the best way to do that.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact