TABLEEXISTS()

From Lianjapedia
Revision as of 08:20, 2 October 2012 by Lianjasupport (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Function to check whether table exists

Syntax

TABLEEXISTS(<expC1>, <expC2>)

See Also

CLOSE DATABASES, CREATE DATABASE, DATABASE(), DATABASEEXISTS(), DBC(), DBF(), FILE(), 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