Knowledge Walls
John Peter
Pune, Maharashtra, India
View in Mysql of Code Template
3785 Views
Create View
CREATE VIEW view_name AS
SELECT rno,name FROM STUDENTS;
Run Views
SELECT * FROM view_name;
SELECT * FROM view_name WHERE rno = 1001;
Replace existing view
CREATE OR REPLACE VIEW view_name AS
SELECT rno,name FROM umt_user;
Show created views
-- Show all views names
SHOW FULL TABLES IN db_name WHERE TABLE_TYPE LIKE 'VIEW';

-- Show View source
SHOW CREATE VIEW view_name;
DROP View
DROP VIEW view_name;
DROP VIEW IF EXISTS view_name;
Previous Topics
Previous lessons of current book.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details