Powershell中字符串中变量的替换成员

Jos*_*shL 6 string powershell

我在PowerShell脚本中有以下字符串表达式:

"select count(*) cnt from ${schema}.${table} where ${col.column_name} is null"
Run Code Online (Sandbox Code Playgroud)

模式和表分别解析为$ schema和$ table的值.但是,为$ {col.column_name}提供了一个空字符串.如何作为字符串替换的一部分插入变量的成员?

Rob*_*ble 9

怎么样:

"select count(*) cnt from $schema.$table where $($col.column_name) is null"
Run Code Online (Sandbox Code Playgroud)