Posts

Showing posts from June, 2021

MySQL Notes

MySQL Keywords and Queries Update Records by joins UPDATE screening, babies SET screening.baby_id = babies.id WHERE screening.baby_username = babies.baby_username MySQL Table Locking A lock is a mechanism associated with a table used to restrict the unauthorized access of the data in a table.  MySQL allows a client session to acquire a table lock explicitly to cooperate with other sessions to access the table's data . MySQL also allows table locking to prevent it from unauthorized modification into the same table during a specific period. A session in MySQL can acquire or release locks on the table only for itself. Therefore, one session cannot acquire or release table locks for other sessions. It is to note that we must have a TABLE LOCK and SELECT privileges for table locking. Table Locking in MySQL is mainly  used to solve concurrency problems . It will be used while running a transaction, i.e., first read a value from a table (database) and then write it into the table (