- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the prerequisites before starting writing and using MySQL views?
As we know that MySQL 5 introduced views, hence, first of all, we need to check for the version of MySQL before starting writing and using stored procedures. It can be done with the following query −
mysql> Select VERSION(); +-----------+ | VERSION() | +-----------+ | 5.7.20 | +-----------+ 1 row in set (0.10 sec)
Privileges for current user
Actually CREATE VIEW statement requires the CREATE VIEW privilege. Privileges for the current user can be checked with the following query −
mysql> SHOW PRIVILEGES
Selecting a database
Before creating a view we must have to select a database from the available databases. It can be done with the help of the following query −
mysql> USE query; Database changed
From the above query, it is clear that we are using a database named ‘query’.
- What are the prerequisites for starting writing and using MySQL stored procedure?
- What are the limitations of using MySQL views?
- What are the prerequisites for learning Java?
- What are the prerequisites for learning C#?
- What are the prerequisites to learn Selenium?
- What are the different privileges required for using views?
- What are the types of Materialized Views?
- What are the benefits of using MySQL views as compared to selecting data directly from MySQL base tables?
- Starting and Stopping MySQL Server
- What are reading and writing characters in C language?
- What are the differences between the Chicago style and MLA style of writing?
- How to display progress dialog before starting an activity in Android using Kotlin?
- Difference between Views and Materialized Views in SQL
- Reading and Writing CSV File using Python
- How to add separator to numbers using MySQL views?