title: Could not create constraint or index
body: <p>I'm running this SQL statement</p>
  <pre><code>CREATE TABLE TblPeminjaman
  (
      KodePeminjaman varchar(4) PRIMARY KEY,
      KodeBuku varchar(4) NOT NULL
          FOREIGN KEY (KodeBuku) REFERENCES TblPeminjaman (KodePeminjaman),
      NIM varchar(9) NOT NULL
          FOREIGN KEY (NIM) REFERENCES TblPeminjaman (KodePeminjaman),
      TglPinjam Date NOT NULL,
      TglKembali Date NOT NULL,
      Status varchar(10) NOT NULL
          CHECK (Status = 'Kembali' OR Status = 'Pinjam')
  );
  
  INSERT INTO dbo.TblPeminjaman (KodePeminjaman, KodeBuku, NIM, TglPinjam, TglKembali, Status)
  VALUES ('P002', 'BU04', 182112222, '17/03/2021', '23/03/2021', 'Pinjam')
  </code></pre>
  <p>I'm getting this error:</p>
  <blockquote>
  <p>Msg 1753, Level 16, State 0, Line 83<br />
  Column 'TblPeminjaman.KodePeminjaman' is not the same length or scale as referencing column 'TblPeminjaman.NIM' in foreign key 'FK__TblPeminjam__NIM__208CD6FA'. Columns participating in a foreign key relationship must be defined with the same length and scale.</p>
  <p>Msg 1750, Level 16, State 1, Line 83<br />
  Could not create constraint or index. See previous errors.</p>
  </blockquote>
  <p>Please help me</p>