What does this sentence mean? If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [perper
Excuse me: If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [perpersondata] ') and objectproperty (ID, n'isusertable') = 1)
What does object_id (n' [DBO]. [perpersondata] ') mean? Which object_id function? Which n?
What does the objectproperty function in objectproperty (ID, N 'isusertable') = 1 mean? What does that mean by = 1?
Object_id: returns the ID of the database object. N is an explicit conversion of non-Unicode characters into Unicode characters, which comes from the national (UNICODE) data type in the SQL-92 standard for expansion and standardization, where it is not needed, write object_id (perpersondata ).
Objectproperty: returns information about objects in the current database. 1 Table "true ". You can also write objectproperty (ID, susertable) = 1.
The entire statement indicates whether a table such as perpersondata exists in the database.
The entire statement can be abbreviated:
If exists (select * From sysobjects where objectproperty (object_id ('perpersondata'), 'istable') = 1)