我需要为MySQL表的字段(制造商)指定一个常量值。这是一个例子:
select cust_id as 'Customer Record ID', address_flag as 'Address Verified',
oem_manuf as 'Manufacturer'
from sales_db;
我希望在查询中返回字段制造商设置为XYZ Inc.如何在查询中执行此操作而不必在每行中为oem_manuf字段存储XYZ Inc?谢谢!
答案 0 :(得分:3)
select cust_id as 'Customer Record ID', address_flag as 'Address Verified',
'XYZ Inc' as 'Manufacturer' from sales_db;