What does MAX(field_name) return when no data?
I have a scenario where a SELECT MAX() query may not have any results.
SELECT MAX(location_order) AS max_location_order
FROM locations_data
WHERE location_parent_id = '$new_location_insert_position_id'"
If there are no items with an appropriate location_parent_id value, what value does max_location_order take?
Null, 0 (zero) or unassigned?
max value when no data in the table
hi...
if no data in the table... max(field_name) return the NULL value.
By
S.Ashokkumar
PDI
India.