-
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.
-
Thank you for your reply.
What I mainly failed to ask is...
Is this behaviour the same in all reasonably current versions of MySQL?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|