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

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -