Using sp_tableoption to change “text in row”

sp_tableoption is used to turn on/off features on tables like turn on the text in row feature for datatype text, ntext, or image columns, pinning a table, table lock on bulk insert.

Example: Enables the 'text in row' option on customers table inline limit to 1000
EXEC sp_tableoption 'customers', 'text in row', '1000'

Using “OBJECTPROPERTY” one can print the current setting
SELECT OBJECTPROPERTY(object_id('customer'), 'TableTextInRowLimit') — To print text in row limit
SELECT OBJECTPROPERTY(object_id('customer'), 'TableIsLockedOnBulkLoad') — To print isTableLockedOnBulk load
SELECT OBJECTPROPERTY(object_id('customer'), 'TableIsPinned') — To print if table is pinned

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.