DROP TABLE IF EXISTS `v_psketch`;
DROP VIEW IF EXISTS `v_psketch`;

CREATE OR REPLACE VIEW `_db_psketch`.`v_psketch` AS 
SELECT m_psketch.*, _db_account.m_account.c_handle
FROM m_psketch
LEFT OUTER JOIN _db_account.m_account ON m_psketch.id_account = _db_account.m_account.id_account
WHERE m_psketch.c_delete <> 999;


CREATE OR REPLACE VIEW `_db_psketch`.`v_comment` AS 
SELECT m_comment.*, _db_account.m_account.c_handle
FROM m_comment
LEFT OUTER JOIN _db_account.m_account ON m_comment.id_account = _db_account.m_account.id_account
WHERE m_comment.c_delete <> 999;
