Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contrib/drivers/dm/dm_table_fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

const (
tableFieldsSqlTmp = `SELECT * FROM ALL_TAB_COLUMNS WHERE Table_Name= '%s' AND OWNER = '%s'`
tableFieldsSqlTmp = `SELECT c.COLUMN_NAME, c.DATA_TYPE, c.DATA_DEFAULT, cc.COMMENTS FROM ALL_TAB_COLUMNS c LEFT JOIN ALL_COL_COMMENTS cc ON c.COLUMN_NAME=cc.COLUMN_NAME AND c.TABLE_NAME=cc.TABLE_NAME AND c.OWNER=cc.OWNER WHERE c.TABLE_NAME= '%s' AND c.OWNER= '%s'`
)

// TableFields retrieves and returns the fields' information of specified table of current schema.
Expand Down Expand Up @@ -62,7 +62,7 @@ func (d *Driver) TableFields(
Default: m["DATA_DEFAULT"].Val(),
// Key: m["Key"].String(),
// Extra: m["Extra"].String(),
// Comment: m["Comment"].String(),
Comment: m["COMMENTS"].String(),
}
}
return fields, nil
Expand Down
Loading