Home > SQL Server > TypeProperty – SQL Server

TypeProperty – SQL Server


TypeProperty() – This function returns the data type property information.

Function syntax

TypeProperty(type , property)

Valid types value that we can use in this function are

pic1Valid property that we can use in this function are

  • AllowsNull
  • OwnerId
  • Precision
  • Scale
  • UsesAnsiTrim

This function returns an integer value. This function may return NULL value on error or the user does not have permission to view the object.

Example

Using TypeProperty function to read the type property value

pic2

Catalog views for the type objects

SELECT * FROM sys.types
SELECT * FROM sys.assembly_types

Query execution

pic3

Advertisements
  1. No comments yet.
  1. March 29, 2013 at 11:12 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: