• Thanks for nice question.

    ---Statement 1

    CREATE TABLE #table1

    (

    ID int PRIMARY KEY,

    Name varchar(20)

    CONSTRAINT UN_Name UNIQUE(Name)

    );

    CREATE TABLE #table2

    (

    ID int PRIMARY KEY,

    PersonName varchar(30) REFERENCES #table1(Name)

    );

    go

    select * from #table1

    select * from #table2

    drop table #table1

    The above code will not throw error. Because the length of the data type for column PersonName in second table is greater than the length of first table column Name

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)