Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question: How to check for a tables existence in a smart (fast) way ??
if not exists (select * from sysobjects where type = 'u' and name = 'tablename')
/* create table */
mg25711_at_gaia.swipnet.se wrote in message
<34BA9C52.4284AC81_at_gaia.swipnet.se>...
>Hello,
>
>there is a tabledefs collection which stores all tables,
>After looking up the helpfile i found this, look how to enumerate thru the
>tabledefs collection,
>Set dbsNorthwind = OpenDatabase("Northwind.mdb")
>
> ' Enumerate TableDefs collection.
> For Each tdfLoop In dbsNorthwind.TableDefs
> Debug.Print " " & tdfLoop.Name
> Next tdfLoop
>
>dbsNorthwind.Close
>
>Rgds
>Nils
>
>
>Denise Duggan skrev:
>
>> You just need to see if the table is there? You know the name of the
table
>> (or the user can enter it?)?? Say it's tableX. Would file(tableX.dbf)
not
>> work? I believe that's VFP but any language should have something
similar.
>> In my rather unexperienced opinion :)
>>
>> --
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Denise Duggan
>> aka HyperMommy
>> Mom to Jimmy (4) and Joey (2)
>> Who are both "all boy"
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> õ¸®¾È NEWS GROUP ÀÌ¿ëÀÚ <RESURECT_at_chollian.dacom.co.kr> wrote in article
>> <69akcp$kj8$1_at_news1.dacom.co.kr>...
>> > Brad Murray (BradMurray_at_SeeSignatureIfThere.com) wrote:
>> > : [This followup was posted to comp.databases.oracle.misc and a copy
was
sent
>> > : to the cited author.]
>> > : In article <6935n9$nrp_at_info.telenor.no>,
jorgen.hauikland_at_fou.telenor.no
>> > : said...
>> > :
>> > : > I'm working on an application and need to create some tables if
they
don't
>> > : > already exists - sometimes they do. I've tried to find a smart SQL
statement
>> > : > but i end up with something that lists smaller or larger parts of
the
table.
>> > : > This is no good solution because this table can occasionally be
quite
large
>> > : > (50 - 60 MB). I need a statement that don't do any searching in the
table,
>> > : > just sees if it's there.
>> > : Just search for its existence in the Accessible_Columns view.
>> > :
![]() |
![]() |