Dropping rules  Chapter 14: Using Batches and Control-of-Flow Language

Chapter 13: Defining Defaults and Rules for Data

Getting information about defaults and rules

The system procedure sp_help, when used with a table name, displays the rules and defaults that are bound to columns. This example displays information about the authors table in the pubs2 database, including the rules and defaults:

sp_help authors 

sp_help also reports on a rule bound to a user-defined datatype. To check whether a rule is bound to the user-defined datatype p#, use:

sp_help "p#"

sp_helptext reports the definition (the create statement) of a rule or default.

If the source text of a default or rule was encrypted using sp_hidetext, Adaptive Server displays a message advising you that the text is hidden. For information about hiding source text, see sp_hidetext in the Reference Manual.

If the System Security Officer has reset the allow select on syscomments.text column parameter with sp_configure (as required to run Adaptive Server in the evaluated configuration), you must be the creator of the default or rule or a System Administrator to view the text of a default or rule through sp_helptext. For more information, see evaluated configuration in the Adaptive Server.





Copyright © 2005. Sybase Inc. All rights reserved. Chapter 14: Using Batches and Control-of-Flow Language

View this book as PDF