SQL 能否怎么查出某个表的所有字段并保留原来的顺序?
--select name from syscolumns where id = object_id('employee_weekcount')这种方法可以获取但是不能保留原来的顺序
请问一下大家有没有什么好的办法可以实现这个问题的啊?感激不尽!
[解决办法]
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG=N'DB_NAME' AND TABLE_SCHEMA=N'dbo' AND TABLE_NAME=N'TABLE_NAME' ORDER BY ORDINAL_POSITION