Click here to Skip to main content
15,885,435 members
Articles / Programming Languages / SQL

A Small Utility to Generate Cascading Delete SQL Script in Oracle

Rate me:
Please Sign up or sign in to vote.
4.33/5 (7 votes)
22 Feb 2011CPOL2 min read 27.7K   410   7  
The article is to introduce a utility to generate cascading delete script for an Oracle table.
Public Interface IDictionaryInfo

    ''' <summary>
    ''' Get Primary Key of a table 
    ''' </summary>
    ''' <param name="strTableName"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetPKColName(ByVal strTableName As String) As String

    ''' <summary>
    ''' Get foreign key reference table and the foreign key column in that table
    '''   A list of KeyValuePair replaces a dictionary since one reference table may have 1+ reference column. 
    ''' </summary>
    ''' <param name="strTableName"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetFKReferences(ByVal strTableName As String) As List(Of KeyValuePair(Of String, String))


End Interface

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions