I have no idea about how to get all products custom attributes data using product id but not using like this :
$_product = Mage::getModel('catalog/product')->load(674);
I need using custom MySql query.
You can use this:
$collection = Mage::getResourceModel('catalog/product_collection')
->addIdFilter(674)
->addAttributeToSelect('*');
Using echo $collection->getSelect()->__toString();
will print a SQL query like:
SELECT
e
.entity_id
,e
.type_id
,e
.attribute_set_id
, [...] FROMcatalog_product_flat_2
ASe
WHERE (e.status = 1) AND (e.entity_id = '674')
If you want to outpu all data you can use
var_dump($collection->getFirstItem()->getData());