Ich habe Abfrage SQL Server-Datenbank: -Konvertieren von SQL Server Query zu Oracle Abfrage
SELECT DISTINCT
info.COLUMN_NAME AS NAME,
info.TABLE_SCHEMA AS TABLESCHEMA,
info.TABLE_NAME AS TABLENAME,
info.ORDINAL_POSITION AS POSITION,
info.IS_NULLABLE AS ISNULLABLE,
info.DATA_TYPE AS DATATYPE,
tc.CONSTRAINT_TYPE AS CONSTRAINTTYPE,
kcufk.TABLE_SCHEMA AS REFRENCESCHEMA,
kcufk.TABLE_NAME AS REFRENCETABLE,
kcufk.COLUMN_NAME AS REFRENCECOLUMN
FROM INFORMATION_SCHEMA.COLUMNS info
LEFT OUTER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE kcu
ON kcu.COLUMN_NAME = info.COLUMN_NAME
AND kcu.TABLE_NAME = info.TABLE_NAME
LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
ON tc.CONSTRAINT_NAME = kcu.CONSTRAINT_NAME
AND tc.TABLE_NAME = kcu.TABLE_NAME
LEFT OUTER JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rk
ON rk.CONSTRAINT_NAME = tc.CONSTRAINT_NAME
LEFT OUTER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE kcufk
ON kcufk.CONSTRAINT_NAME = rk.UNIQUE_CONSTRAINT_NAME
WHERE info.TABLE_NAME = 'Category'
AND info.TABLE_SCHEMA = 'core'
ORDER BY info.ORDINAL_POSITION ASC;
Wie kann ich diese SQL Server-Abfrage in eine Oracle-Abfrage-Format konvertieren?
Haben Sie es versucht? Welches Problem hast du? – Aleksej
@Aleksej: - Ya ich habe es versucht. Problem ist, dass Zeilen mehrmals kommen. – Sanjiv
kommen sie mehrmals in SQL Server? Sind deine Daten gleich? – Matt