AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Mysql create view11/30/2022 #Mysql create view update#If the view is created using multiple tables then we will not be allowed to update the view. The view should be created from a single table.The view should not be created using nested queries or complex queries.The View should have all NOT NULL values. The SELECT statement should not have the DISTINCT keyword.The SELECT statement which is used to create the view should not include GROUP BY clause or ORDER BY clause.If any one of these conditions is not met, then we will not be allowed to update the view. There are certain conditions needed to be satisfied to update a view. View_name: Name of the View which we want to delete.įor example, if we want to delete the View MarksView, we can do this as: DROP VIEW MarksView We can delete or drop a View using the DROP statement. SQL allows us to delete an existing View. We have learned about creating a View, but what if a created View is not needed any more? Obviously we will want to delete it. To display data of View MarksView: SELECT * FROM MarksView WHERE StudentDetails.NAME = StudentMarks.NAME SELECT StudentDetails.NAME, StudentDetails.ADDRESS, StudentMarks.MARKS To create a View from multiple tables we can simply include multiple tables in the SELECT statement. Creating View from multiple tables: In this example we will create a View named MarksView from two tables StudentDetails and StudentMarks.If we now query the view as, SELECT * FROM StudentNames ISRO CS Syllabus for Scientist/Engineer Exam.
0 Comments
Read More
Leave a Reply. |