I am trying to create a view for the following query.
SELECT DISTINCT
products.pid AS id,
products.pname AS name,
products.p_desc AS descri
CREATE VIEW vw_product_services AS
SELECT DISTINCT products.pid AS id,
products.pname AS name,
products.p_desc AS description,
products.p_loc AS location,
products.p_uid AS userid,
products.isaproduct AS whatisit
FROM products
UNION
SELECT DISTINCT services.s_id AS id,
services.s_name AS name,
services.s_desc AS description,
services.s_uid AS userid,
services.s_location AS location,
services.isaservice AS whatisit
FROM services
I tried this and it worked! Thanks everyone :)