need When querying a field, you need to give the same value to a field. You can hard-code this value or get it from the database 1. Hard-coded values SELECT mfr_id AS mfrId, mfr_name AS mfrName, IFNULL(NULL, 587694978080178176) AS suppId FROM mater_prod materProd Query results 2. Get values from the database SELECT mfr_id AS mfrId, mfr_name AS mfrName, IFNULL(NULL, mfr_id) AS suppId FROM mater_prod materProd Query results Supplementary knowledge: How to set a default value if the mysql query field is empty In common cases, the following is to calculate inventory. If the inventory or locked inventory is empty, the default value is 0. SELECT (IFNULL(t_inventory.pro_number,0)-IFNULL(t_inventory.locked_number,0)) AS content_number FROM t_inventory The above operation of assigning default values to fields during MySQL query is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue realizes the product magnifying glass effect
>>: How to install rabbitmq-server using yum on centos
This article shares the specific code of js to ac...
Let me first talk about the implementation steps:...
Table of contents Preface style-loader css-loader...
Table of contents 1 Test Cases 2 JS array dedupli...
1. display:box; Setting this property on an eleme...
Table of contents Question: 1. First attempt 2. R...
Table of contents 【Code background】 【Code Impleme...
Table of contents 1. What is a directive? Some co...
Table of contents Rendering API changes Render fu...
Effect (source code at the end): accomplish: 1. D...
When we make a gradient background color, we will...
1. Download address: mysql-8.0.17-winx64 Download...
Table of contents Three steps to operate the data...
This is a website I imitated when I was self-stud...
Regarding display: flex layout, some people have ...