Difference between revisions of "TABLEEXISTS()"

From Lianjapedia
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[CLOSE DATABASES]], [[COLUMNEXISTS()]], [[CREATE DATABASE]], [[DATABASE()]], [[DATABASEEXISTS()]], [[DBC()]], [[DBF()]], [[FILE()]], [[OPEN DATABASE]], [[USE]], [[USED()]]
+
[[CLOSE DATABASES]], [[COLUMNEXISTS()]], [[CREATE DATABASE]], [[DATABASE()]], [[DATABASEEXISTS()]], [[DBC()]], [[DBF()]], [[FILE()]], [[INDEXEXISTS()]], [[OPEN DATABASE]], [[USE]], [[USED()]]
  
 
==Description==
 
==Description==
Line 25: Line 25:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Cursor Functions]]
 
[[Category:Cursor Functions]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 09:28, 14 March 2013

Purpose

Function to check whether table exists

Syntax

TABLEEXISTS(<expC1>, <expC2>)

See Also

CLOSE DATABASES, COLUMNEXISTS(), CREATE DATABASE, DATABASE(), DATABASEEXISTS(), DBC(), DBF(), FILE(), INDEXEXISTS(), OPEN DATABASE, USE, USED()

Description

The TABLEEXISTS() function returns .T. if the table name specified in <expC2> exists in the database specified in <expC1> and .F. otherwise.

Example

if tableexists("southwind","customers")
    open database southwind
    use customers
else
    open database southwind
    create table customers (...)
endif