SQL server question

  • Hi,

    I am just starting learning SQL..

    I need help:

    I want to create a check constraint for a column in Table1 so that it is smaller than another column value in another table?

    I tried join but it is not working!

  • You would have to use a user-defined function to reference columns in other tables (which could have performance impacts).

    Your table design may be wrong if you have a column value that is dependent on/constrained by a column in  another table (other than a foreign key).

    Can you provide DDL & sample data (and descriptions if names/concepts are not obvious) for your tables per How to post code problems?

  • urvasjets wrote:

    Hi,

    I am just starting learning SQL..

    I need help: https://xender.vip/

    I want to create a check constraint for a column in Table1 so that it is smaller than another column value in another table?

    I tried join but it is not working!

     

    I got this,...

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply