Select 'private ' ||
Case
When a.Data_Type = 'VARCHAR2' Then
'String'
When a.Data_Type = 'DATE' Then
'Date'
When a.DATA_SCALE = 0 Then
'Long'
Else
'Double'
End || ' ' || (lower(a.Column_Name)) || '; //' || b.Comments
From User_Tab_Cols a, User_Col_Comments b
Where a.Table_Name = b.Table_Name
And a.Column_Name = b.Column_Name
And a.Table_Name = 'KC71'--表名
Order By a.COLUMN_ID