}
// Foreign Key
Map<DBColumn, DBColumn> referencesMap = t.getColumnReferences();
if (referencesMap != null)
{
DBColumn source = null,target = null;
for (Entry<DBColumn, DBColumn> entry : referencesMap.entrySet())
{
source = entry.getKey();
target = entry.getValue();
sql.append((addSeparator) ? ",\r\n " : "\r\n ");
sql.append("FOREIGN KEY (");
source.addSQL(sql, DBExpr.CTX_NAME);
sql.append(") REFERENCES ");
sql.append(target.getRowSet().getName());
sql.append(" (");
target.addSQL(sql, DBExpr.CTX_NAME);
sql.append(")");