sqlcommand.Parameters.Add(...) 函数有多个重载。其中一些不考虑大小,而有些则这样做。默认设置了哪些尺寸?不设置参数大小是否安全?它会影响性能吗?
最佳答案
来自 SqlParameter.Size Property多科
If not explicitly set, the size is inferred from the actual size of the specified parameter value.
Peter Wone 在 293315 上有一个很棒的回复更详细地描述了这实际上意味着什么
关于sql - ADO.NET 中 SQL 参数的默认大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/903651/