mysql - how do you insert data into a table correctly using INSERT INTO? -


i new sql , relational databases, writing code add data tables have created. not sure if code have written correct inserting table. can tell me if correct please.

insert job (job_id, job_name)              values (‘1’, ‘teacher’); 

you code right if use autoincrement column job_id should use

and use single quote s , not

insert job ( job_name)          values ( 'teacher'); 

otherwise code prodivided

insert job (job_id, job_name)          values ('1', 'teacher ); 

Comments

Popular posts from this blog

Lists in Python -

android - can not access to progress bar in an other activity -

html - Not able to access next element of an array javascript -