加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
fields.sql 437 Bytes
一键复制 编辑 原始数据 按行查看 历史
Emiliano Heyns 提交于 2018-02-16 11:25 . cleanup
SELECT it.typeName, COALESCE(bf.fieldName, f.fieldName) as fieldName, CASE WHEN bf.fieldName IS NULL THEN NULL ELSE f.fieldName END as fieldAlias
FROM itemTypes it
JOIN itemTypeFields itf ON it.itemTypeID = itf.itemTypeID
JOIN fields f ON f.fieldID = itf.fieldID
LEFT JOIN baseFieldMappingsCombined bfmc ON it.itemTypeID = bfmc.itemTypeID AND f.fieldID = bfmc.fieldID
LEFT JOIN fields bf ON bf.fieldID = bfmc.baseFieldID
ORDER BY 1, 2
;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化