SQL Server sp_helpconstraint constraint_keys字段在PHP中最多被截断为256个字符

SQL Server sp_helpconstraint constraint_keys字段在PHP中最多被截断为256个字符

问题描述:

I am writing a sQL parser to compare existing SQL database definitions to expected definitions via a DDL file.

I'm parsing constraints at the moment, but noticed that the constraint_keys column in the sp_help/sp_helpconstraint function(s) only seem to return 256 chars of the column in PHP/MSSQL.

I see a related question/answer here regarding 256 char varchar columns and how to get longer than this out of the PHP/MSSQL interface...

however, can I do this with the sp_constraint query? If so how?

我正在编写一个sQL解析器,通过DDL文件将现有SQL数据库定义与预期定义进行比较。 p>

我正在解析约束,但注意到sp_help / sp_helpconstraint函数中的constraint_keys列似乎只返回PHP / MSSQL中列的256个字符。 / p>

我在这里看到一个相关的问题/答案关于256个char varchar列以及如何从PHP / MSSQL接口中获得更长的时间...... p>

但是,我可以使用sp_constraint查询执行此操作吗? 如果是这样的话? p> div>

Use the official SQL Server PHP driver, they support all SQL server types properly.