Database 向DolphinDB表中的列添加注释
我想向现有表中添加注释列。我该怎么做Database 向DolphinDB表中的列添加注释,database,comments,dolphindb,Database,Comments,Dolphindb,我想向现有表中添加注释列。我该怎么做 谢谢 如果我正确理解了这个问题, 您可能需要使用setColumnComment函数(该函数将注释添加到表列) 比如说, db=database("dfs://db1") payroll=table(take(1..10, 100) as id, rand(36+1..10, 100) as time, take(5000 5500 6000 6500, 100) as wage) dt123=db.createTable(payroll
谢谢 如果我正确理解了这个问题, 您可能需要使用setColumnComment函数(该函数将注释添加到表列) 比如说,
db=database("dfs://db1")
payroll=table(take(1..10, 100) as id, rand(36+1..10, 100) as time, take(5000 5500 6000 6500, 100) as wage)
dt123=db.createTable(payroll,`dt123).append!(payroll)
setColumnComment(dt123, {time:"time card hours", wage:"wage(dollar)"})
然后使用函数schema查看列注释
schema(dt123).colDefs
name typeString typeInt comment
---- ---------- ------- ---------------
id INT 4
time INT 4 time card hours
wage INT 4 wage(dollar)