SQL Server Information Store - View and Table Storage in the Database

xiaoxiao2021-03-06  89

The view is a virtual "table" built on the real table, which is actually a string code in the store in the database. For example, we have created a view, if you get all the views in the current library? In fact, we only need to do the following SQL statement. Select Name from sysObjects where xtype = 'v' can. In SQL Server, there are many information stored in this SysObjects table, where xtype = 'v' is a view (including the system created), Xtype = 'u' is a table, we can get the query on this table. The currently available views and tables. In addition, you can also get the list of needs to be called by the method of AdoConnection, as follows: tadoconnection.gettablenames Table Name list Tadoconnection.getProcedureNames Take the Storage Procedure list For view, before, it is mentioned in the library, and it is its creation code. It is stored in syscomments, corresponding records are syscomments.id = sysObjects.id, and the view code is saved in the text field of SysComments. In addition, the stored procedure seems to be saved in this table, but the stored procedure has not been understood, so it is not confirmed. Saves a lot of useful information in the system table, including user information, library file saving path, and other parameters (custom variable type, etc.) are saved in the table starting in SYS, and later encountered a summary.

转载请注明原文地址:https://www.9cbs.com/read-101128.html

New Post(0)