object_owner_id

Description

Returns an object’s owner ID.

Syntax

object_owner_id(object_id[, database_id])

Parameters

object_id

is the ID of the object you are investigating.

database_id

is the ID of the database in which the object resides.

Examples

Example 1

Selects the owner’s ID for an object with an ID of 1, in the database with the ID of 1 (the master database):

select object_owner_id(1,1)

Permissions

Any user can execute object_owner_id.