does mysql lock table while inserting or only lock record

hi there

does mysql lock table while inserting or only lock record?

thanks in advance

Depends on the type of the table, InnoDB uses row-level locking while MyIssam uses table-level locking. >For more details check the mysql docs - https://dev.mysql.com/doc/refman/5.7/en/internal-locking.html