Re: EXISTS

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 28 Jan 2009 17:04:58 +0100
Message-ID: <49808224$0$24227$426a74cc_at_news.free.fr>


"Wilfrid" <grille11_at_yahoo.com> a écrit dans le message de news: 49807732$0$10060$426a74cc_at_news.free.fr...
| Hello,
|
| There has been many communication on the exists command on newsgroups, web
| sites... but I could not find anything close to this (below) that it can be
| possible with MS SQL.
|
| I am migrating databases and scripts from SQL to Oracle and I am trying to
| make things as simple as possible.
| Is there a simple way with oracle that does the same thing as the script
| below in SQL?
| I am testing if the table 'tablename' exists in the schema and if no create
| it.
|
| IF OBJECT_ID('tablename') is null
| CREATE TABLE tablename
| (
| id int not null,
| name nvarchar(10) null
| )
| go
|
| Thanks in advance for your help
|
|

Check if it is in user_tables

Regards
Michel Received on Wed Jan 28 2009 - 10:04:58 CST

Original text of this message