From the course: Learning phpMyAdmin
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Editing a view
- We've created a view that retrieves statistics about the cars in the upper running database. But, take a look at the average here. This has been what has been returned by the my 'SQL average function.' And it's given us the value to six decimal places. We need to edit the view to round the value to just two decimal places. The 'create view' dialogue box has an option to 'replace' a view. So let's try running the car's stats view again... And then scroll down to the bottom and 'create view.' Well there's the 'or replace' but this is not at all helpful. Because instead of guessing the SQL from which the view was originally created, we've just got the view itself. So, that's no good. We'll have to click 'close.' One way we could handle this problem is to reload the SQL file from the previous video. But let's imagine that you don't have the original SQL in a handy file. The way to edit a view is tucked away in a place that's not immediately obvious. First, we need to list all the views…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.