Master SQL for Beginners-How to Create Tables (Part 3)

Поділитися
Вставка
  • Опубліковано 11 лис 2024

КОМЕНТАРІ • 7

  • @thisisareminder3315
    @thisisareminder3315 9 місяців тому

    THANK YOU!

    • @codecrushers21
      @codecrushers21  9 місяців тому

      Thankyou so much for watching! Your support means everything

    • @thisisareminder3315
      @thisisareminder3315 9 місяців тому

      @@codecrushers21 I have a question. In the db.employee the department ID is NULL but in the db.depart it is NOT NULL. I tried to alter the value to not null in db.employee but it is giving me error and I couldn't save the change. What should I do to correct it ya?

    • @codecrushers21
      @codecrushers21  9 місяців тому +1

      You should check if there are null value of department id in db.employee. There must not be any null value if you want to make it not null. If the problem continue send us an screenshot, so we can help you

    • @thisisareminder3315
      @thisisareminder3315 9 місяців тому +1

      @@codecrushers21 understood! Thanks for the guidance! I was studying today planning to go through part 4 but I ended up revising part 3 as I needed to create the gender table and put all the data before I can proceed. 🤣🤣Loving your videos! Pretty sad that there is only 5 part, nevertheless very very helpful.

  • @TheEpicReapzz
    @TheEpicReapzz 6 місяців тому +1

    Thanks for the greatvideo and please go on. We made 2 tables with each have theire own primary key, but suddenly u say we are going to make the foreign key the department id. But how can it be a foreign key if we just made it a primary key?

    • @ejonamara1874
      @ejonamara1874 6 місяців тому +1

      Yes indeed Department id is a primary key in department table but it is going to be a foreign key in the department id column of the other table Employee.