I'm a newbie in SQL and i have a question for you people. So, I have these two tables one "account" has an id(int primary key), email(nvarchar), password(nvarchar), u_id(int foreign key(user id)). The other one "user" has an id(int primary key), name(nvarchar), a_id(int foreign key(account id)). So my question is how do I insert a user if I don't have a foreign key(account id) created yet? I would use the following command:
INSERT INTO public.user(id, name, u_id) VALUES ('1', 'amanda', 'i did not created any account yet');
Could i insert a tuple with null value then insert an account tuple with null value too and then update both?