edit sps_view add column `invo`.`employee_id` add where invoit.deleted_at is null CREATE OR REPLACE VIEW sps_view AS select `invo`.`invoice_no` AS `invoice_no`,`invo`.`customer_name` AS `customer_name`,`prod`.`product_name` AS `product_name`,`invoit`.`quantity` AS `quantity`,`invoit`.`amount` AS `amount`,`invo`.`issue_date` AS `created_at`,`invo`.`employee_id` AS `employee_id` from (((`hgrains_hgorder`.`invoices` `invo` left join `hgrains_hgorder`.`invoice_items` `invoit` on((`invo`.`id` = `invoit`.`invoice_id`))) left join `hgrains_hgorder`.`employees` `emp` on((`emp`.`id` = `invo`.`employee_id`))) left join `hgrains_hgorder`.`products` `prod` on((`invoit`.`product_id` = `prod`.`id`))) where isnull(`invoit`.`deleted_at`)