想知道是否可以使用存储过程获取服务器的 mac 地址? 我做了一些搜索,但一无所获。这是使用 SQL2008。
更新
不幸的是,使用 newsequentialid() 的答案可能返回错误
MacAddress 如果服务器上有 VMWare。
最佳答案
有点圆的方法!
declare @t table
(
i uniqueidentifier default newsequentialid(),
m as cast(i as char(36))
)
insert into @t default values;
select
substring(m,25,2) + '-' +
substring(m,27,2) + '-' +
substring(m,29,2) + '-' +
substring(m,31,2) + '-' +
substring(m,33,2) + '-' +
substring(m,35,2) AS MacAddress
FROM @t
关于sql-server - 是否可以使用存储过程获取 mac 地址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3398428/