我尝试使用IntelliJ IDEA格式化SQL文件并得到类似的结果:
INSERT IGNORE INTO SpectralImages
(scanDataID,
imageToolsetID,
imageTypeID,
imageFilename,
imageDSPath,
fileID)
(SELECT
ScanData.scanDataID,
1,
Files.imageTypeID,
Files.fileName,
Files.fileDSPath,
Files.fileID
FROM ((
Files
LEFT JOIN
Samples_Files
ON (
Samples_Files.fileID
=
Files.fileID)) LEFT JOIN
Scans
ON (
Scans.sampleID
=
Samples_Files.sampleID)) JOIN
ScanData
ON (
ScanData.scanID
=
Scans.scanID)
WHERE
Files.imageTypeID
IS
NOT
NULL
AND
Files.fileID
NOT
IN
(SELECT fileID
FROM
SpectralImages)
GROUP BY
scanDataID,
Files.fileID);
显然它试图将每个术语分成不同的行。这是正常的吗?
是否有其他格式化选项包含更合理的换行符?