Hi I am new to SQL database.
I have two tables one is a “Master” and other is “Sub” like this
Master
uid(primary key) f_name l_name
1 fAaa lAaa
2 fBbb lBbb
second table
Sub
tid(primary key) uid(foreign key) time is_free
1 1 1:00AM 0
2 1 2:00AM 1
3 1 3:00AM 0
4 2 1:30PM 0
5 2 2:30PM 1
from both table we can say that user fAaa lAaa is free at 2:00AM and NOT free at 1:00AM and 3:00AM.
now I want to update like this, for user 1(fAaa lAaa), I want to delete time 2:00AM and want to insert new two time like 5:00AM and 6:00AM for user 1 than what should be my join query for update.
please help me!
Thanks
Like this?
Or
This is some pretty basic stuff, I recommend you do a search for “sql delete from”, “sql insert into”, “sql update” and look for beginner tutorials.