The company now used by the database is SQL. The software in the development process will have a lot of changes, which brings a lot of update and cumbersome work, and the company's software database documents are not updated. It is bound to affect the implementation of the relevant series of work.
In combination with the practice of last year's work, a relatively convenient database update and database document synchronization method, this method is also very simple, it mainly uses system tables for various databases, jointly created views, The main fields of the database structure are extracted, and then the function of obtaining the tools of the external data in Excel, reading the structure of the database directly, and then uses Excel's data update to automatically obtain changes in data structures. The rest of the job can only be remndioted in the database structure.
Additional SQL:
create view v_all_table as SELECT o.name t_name, l.name t_columns, t .name t_type, l.length, l.isnullable, c.text, l.colorderFROM sysobjects o, syscolumns l, systypes t, syscomments cWHERE o.xtype = 'u' and o.id = L.ID and L.XTYPE = T. type and l.cdefault = C.ID and L. Cefault <> 0UNION SELECT O.NAME T_NAME, L.NAME T_COLUMNS, T.NAME T_TYPE, L.LENGTH, L.ISNULLABLE, '' AS TEXT, L.COLORDERFROM SYSOBJECTS O, SYSCOLUMNS L, SYSTYPES Twhere O.XTYPE = 'u' and o.id = L.ID and L.XTYPE = T. type and l. CDEFAULT = 0