![]() But I do have a post on generating your own responses. I don’t recommend that.Īnd since I don’t recommend it, I’m not going to show you how to do that. To actually return an empty string, ” vs null, you’d have to construct the JSON payload yourself and return that. If you insist on doing something else, you could… Do something confusing/bad like this: Using the NVL() function to replace null with an actual value.įor numbers folks will often replace NULLs with Zero (0), but only you can decide if that’s appropriate or dangerous based on your data model and application logic. ![]() ![]() SQLcl & SQLPlus All ORDS ever sees is null, so it can’t return an empty string, e.g. The answer is simply because the database returns a null, not an empty string ( Docs). When we call the API from our browser… Records ‘2’ and ‘3’ both lack a value for “message” Why doesn’t ORDS show ” for a null? INSERT INTO NULLS VALUES ( 3, '' ) Our REST API Show me the records that have an actual ID first, then put the nulls at the end. INSERT INTO NULLS VALUES ( NULL, 'hello null' ) ![]() INSERT INTO NULLS VALUES ( 1, 'hello' ) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |