Edit and update MySQL view in phpMyAdmin
In SQL, View performs the notable role by storing complicated SQL query into a virtual table. In other words, SQL View is stored/saved SQL query. Many users scrabbled while updating/editing the view. Reason is simple, there is no single click option available on screen to do so.
To change or modify the view, follow the below steps.
- Open phpMyAdmin (i.e. from cPanel > Databases)
- Select Database
- Click on SQL Tab (see below screenshot)
- Type SHOW CREATE VIEW view_name
- Click on link Print view (with full texts)
- Select the SQL query from Create View Column immediately after the word “AS” and copy it.
- Paste the copied query in a safe place (i.e. use Notepad)
- Delete the view by typing DROP VIEW view_name in SQL tab
- Now, return to SQL tab
- Paste the previously copied query and hit on the ‘Go’ button
- Click on link Create View located at the below right corner
- Give View name and click on ‘Go’ button
In this way, you can update/edit your MySQL view in phpMyAdmin. If you know/found any other solution then please share via comments. It would be helpful to the new pathfinder.