3

我注意到,虽然我可以使用 %dictionary.compiledclass 来获取具有模式名称和表名称的表,从而允许查询它们的存在,但我不能对列执行相同的操作。我还没有找到允许验证列是否存在或使用 LIKE "prefix%" 检索大量列名的命令。

甚至有这样的事情吗?还是替代方案?

4

2 回答 2

1

您可以使用 %Dictionary.CompiledProperty 表和该表的 SqlFieldName 列。例如,要找出具有列“ColumnName”的表,您可以使用以下查询:

select parent->SqlTableName 
from %dictionary.compiledproperty 
where SqlFieldName='ColumnName'
于 2013-09-01T21:08:59.070 回答
1

执行此查询: select * from %dictionary.compiledproperty Where parent='TableName' and SqlFieldName='ColumnName' Check Row Count value ,0 not exist

于 2013-09-13T09:12:04.993 回答