Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xt-sjc-15!sn-xt-sjc-07!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
From: Sybrand Bakker <postbus@sybrandb.demon.nl>
Newsgroups: comp.databases.oracle.server
Subject: Re: any ideas on why this pice of code dosnt work??
Date: Tue, 08 Aug 2006 19:14:58 +0200
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <nihhd2tlib1vmlip1u2aae0h0uvff57hls@4ax.com>
Reply-To: sybrandb@hccnet.verwijderdit.nl
References: <1155055659.151278.191510@m73g2000cwd.googlegroups.com>
X-Newsreader: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@supernews.com
Lines: 29
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:272381

On 8 Aug 2006 09:47:39 -0700, "Vinay Bhushan" <bhushanvinay@gmail.com>
wrote:

>DECLARE
>        v_userTabColumns INT;
>BEGIN
>
>     SELECT COUNT(*) INTO  v_userTabColumns
>     FROM  USER_TAB_COLUMNS
>     WHERE TABLE_NAME ='T'
>           AND COLUMN_NAME ='ABCD';
>
>     IF v_userTabColumns >0 THEN
>        DBMS_OUTPUT.PUT_LINE ('<<ABCD>><<T>> already Exists');
>     ELSE
>        ALTER TABLE T   ADD (ABCD VARCHAR2(50));
>        DBMS_OUTPUT.PUT_LINE ('New column <<ABCD>> for <<t>>
>created.');
>     END IF;
>
>END;

I responded to this in comp.databases.oracle.misc

PLEASE do not cross- and/or multipost as most people responding here
monitor all groups.

--
Sybrand Bakker, Senior Oracle DBA
