sql server retrieve version of a table
I've seen that sqlite have a id that each time that I change开发者_StackOverflow中文版 something in the table (structure, not data) this id will be incremented, so it's possible understand what version of the table is in use...
with sql server 2008 is this possible?
thanks
No, there's no "out-of-the-box" way of doing this in SQL Server.
You can add meta-data like "extended properties" to your tables (see MSDN: Using Extended Properties on Database Objects for background info) - but you have to design and plan this from the beginning, there's nothing enabled in SQL Server without you doing something about it.
The best you can do in SQL Server without having extended properties in place would be to check the sys.tables
catalog view for the "last modified date" for your table:
select modify_date
from sys.tables
where name = 'YourTableHere'
精彩评论