Category: Table & Views
-
MySQL Unlock Account
Unlock is a mechanism that allows the user to release all locks or any specific lock associated with the account. In this article, we will learn how to unlock the user accounts in the MySQL server. When the CREATE USER… UNLOCK statement creates a new user account, the new user stored as a locked state. If we want to…
-
MySQL Lock Account
A lock is a mechanism used to prevent unauthorized modifications into our database. It is essential to the security of our database. In this article, we are going to learn how to use the CREATE USER… ACCOUNT LOCK and ALTER TABLE… ACCOUNT LOCK statements for locking the user accounts in the MySQL server. We can lock the user accounts…
-
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…
-
MySQL View
A view is a database object that has no values. Its contents are based on the base table. It contains rows and columns similar to the real table. In MySQL, the View is a virtual table created by a query by joining one or more tables. It is operated similarly to the base table but does not…
-
MySQL Rename Column
Sometimes our column name is non-meaningful, so it is required to rename or change the column’s name. MySQL provides a useful syntax that can rename one or more columns in the table. Few privileges are essential before renaming the column, such as ALTER and DROP statement privileges. MySQL can rename the column name in two…
-
MySQL Show Columns
Columns in the table are a series of cells that can stores text, numbers, and images. Every column stores one value for each row in a table. When we work with the MySQL server, it is common to display the column information from a particular table. In this section, we are going to discuss how…
-
MySQL Add/Delete Column
A column is a series of cells in a table that may contain text, numbers, and images. Every column stores one value for each row in a table. In this section, we are going to discuss how to add or delete columns in an existing table. How can we add a column in MySQL table?…
-
MySQL REPAIR TABLE
How to Fix a Corrupted Table in MySQL? MySQL Repair Table allows us to repair or fix the corrupted table. The repair table in MySQL provides support only for selected storage engines, not for all. It is to ensure that we have a few privileges like SELECT and INSERT to use this statement. Normally, we should never use the repair…
-
MySQL Copy/Clone/Duplicate Table
MySQL copy or clone table is a feature that allows us to create a duplicate table of an existing table, including the table structure, indexes, constraints, default values, etc. Copying data of an existing table into a new table is very useful in a situation like backing up data in table failure. It is also advantageous…
-
MySQL Temporary Table
MySQL has a feature to create a special table called a Temporary Table that allows us to keep temporary data. We can reuse this table several times in a particular session. It is available in MySQL for the user from version 3.23, and above so if we use an older version, this table cannot be used. This table is…