How can MySQL return an empty row matching a given table's schema, given the table name as an input string?
1
vote
2
answers
1116
views
How can a query or procedure return an empty copy of a new record?
Ideally suited for objects which are in a transactional allocation process:
It is highly preferable to have authoritative defaults and NULLS for arbitrary tables when constructing
new objects()
that *may-or-may not* ultimately be saved to the database.
For example, a CMS user relies on AJAX which calls for a new post()
or new product()
dynamically. Rather than trusting stored profiles to set values in the scripting language, a blank "instance" of a row would be rather useful.
Asked by That Realtor Programmer Guy
(347 rep)
Jan 5, 2021, 09:45 AM
Last activity: May 6, 2025, 10:04 PM
Last activity: May 6, 2025, 10:04 PM