MySQL 뷰 생성 쿼리 보기 SHOW CREATE VIEW

(MySQL SHOW CREATE VIEW에서 넘어옴)

1 개요[ | ]

SHOW CREATE VIEW
뷰 생성 쿼리 보기
SHOW CREATE VIEW 뷰명;

2 실행 예시[ | ]

mysql> SHOW CREATE VIEW myview1;
+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| View    | Create View                                                                                                                                                                                                                                                                                                                        | character_set_client | collation_connection |
+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| myview1 | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `myview1` AS select `mydb`.`wp_term_relationships`.`object_id` AS `object_id`,`mydb`.`wp_term_relationships`.`term_taxonomy_id` AS `term_taxonomy_id` from `wp_term_relationships` where (`mydb`.`wp_term_relationships`.`object_id` > 1000) | utf8                 | utf8_general_ci      |
+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
1 row in set (0.00 sec)
mysql> SHOW CREATE VIEW myview1 \G
*************************** 1. row ***************************
                View: myview1
         Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `myview1` AS select `mydb`.`wp_term_relationships`.`object_id` AS `object_id`,`mydb`.`wp_term_relationships`.`term_taxonomy_id` AS `term_taxonomy_id` from `wp_term_relationships` where (`mydb`.`wp_term_relationships`.`object_id` > 1000)
character_set_client: utf8
collation_connection: utf8_general_ci
1 row in set (0.00 sec)

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}