DROP TABLE IF EXISTS `v_bbs`;
DROP VIEW IF EXISTS `v_bbs`;

CREATE OR REPLACE VIEW `_mydb_bbs`.`v_bbs` AS 
SELECT m_bbs.*, m_category.c_categoryName, m_category.c_categoryDisplayOrder, _mydb_account.m_account.c_handle
FROM m_bbs
LEFT OUTER JOIN m_category ON m_bbs.id_category = m_category.id_category
LEFT OUTER JOIN _mydb_account.m_account ON m_bbs.id_account = _mydb_account.m_account.id_account
WHERE m_bbs.c_delete <> 999;
