Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle equivalent for OBJECTPROPERTY

761447Jul 26 2010 — edited Jul 28 2010
Hi Friends,
I want the oracle equivalent for the following sql code,
Select @Command = 'IF OBJECTPROPERTY(object_id('''+ @TableName + '''), ''TableHasForeignRef'') = 1
		  		    DELETE FROM ' + @TableName + '
			       ELSE
			           TRUNCATE TABLE ' + @TableName
EXEC sp_MSForEachTable @Command
I have tried to find out, but no use. Please help me.
Thanks,
Ram.
This post has been answered by Solomon Yakobson on Jul 26 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2010
Added on Jul 26 2010
9 comments
1,509 views