Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Add a default value for database queries
Scene: We are doing a database query time, you may experience required need to return to a default value.
If we query a user in the table, need to return to a fixed number of such institutions org, we can achieve through sql statement.
select (242) as amedOrg,catname from user;
Results of the: