SELECT C.CONSTRAINT_NAME, C.CONSTRAINT_TYPE, K.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS C
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS K ON C.CONSTRAINT_NAME = K.CONSTRAINT_NAME AND K.TABLE_NAME='directory' AND TABLE_CATALOG='BTS_DIR'
WHERE C.CONSTRAINT_TYPE IN ('PRIMARY KEY', 'UNIQUE')
ORDER BY K.ORDINAL_POSITION;
/* Errore SQL (209): Ambiguous column name 'TABLE_CATALOG'. */
/* Affected rows: 0 Righe trovate: 0 Avvisi: 0 Durata di 0 of 1 query: 0,000 sec. */
can fix?
can use k.TABLE_CATALOG
TKS
MS MSQL 2000K error
Code modification/commit
6507cb0
from ansgar.becker,
11 years ago,
revision 8.3.0.4761
Fix missing table alias on MSSQL2K. See http://www.heidisql.com/forum.php?t=15506
Please login to leave a reply, or register at first.