Get specific cols. only from the tables

Hi,

I have this following query which works, but i need it to return only the cols. I am asking it to. But its returning all cols in the table. How to get only cols that i am renaming in the query i.e only 5 cols.

SELECT stocks.*, devbg_products.*,
	stoc_id AS SKU,
	ItemName as ItemTitle,
	stoc_qty AS AvailableQuantity,
	ItemPrice AS RetailPrice,
	ItemDescription AS Description
FROM stocks 
	LEFT JOIN devbg_products ON stocks.stoc_item_id = devbg_products.ItemID;

Please help.

Thanks.

Hi,

Sorry my bad, I did the following and its working:

SELECT 
	stocks.stoc_id AS SKU, 
	devbg_products.ItemName as ItemTitle,
	stocks.stoc_qty AS AvailableQuantity,
	devbg_products.ItemPrice AS RetailPrice,
	devbg_products.ItemDescription AS Description
FROM stocks 
	LEFT JOIN devbg_products ON stocks.stoc_item_id = devbg_products.ItemID

Thanks.

You need to change this:

stocks.*, devbg_products.*,

To something like:

stocks.items, stocks.prices, devbg_products.colour, devbg_products.pattern, stoc_id