Crmsql queries table information and crmsql Information
-- Query the object corresponding to the specified lookup field
Select name, OriginalLocalizedName from MetadataSchema. Entity
Where objecttypecode in (
Select objecttypecode from dbo. v_attributeobjecttypes where entityid in
(Select entityid from entity where name = 'new _ store ')
And attributename = 'new _ region'
)
-- Query asynchronous jobs
Select * from dbo. AsyncOperation
-- Query site maps
Select * from dbo. IsvConfigBase
-- Query organization information
Select * from dbo. Organization
-- Query the permissions of an object (entity: new_member)
Select * from dbo. PrivilegeBase where name like '% new_member'
-- Query stored procedure information
Select * from MetadataSchema. StoredProcedureCatalog
Use SQL to query table information
Select * from [Table name] where [Gender column name] = 'femal' and [address column name] = 'shanghai' and [age column name] <19;
How to Use the inner link to query the information of two tables in SQL
Select abstract, sending time, sender name, category, attachment,
Information read time from a, B where a. sender id = B. sender ID