TABLEINFO()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to return information about a table, virtual table or view

Syntax

TABLEINFO(<expC>)

See Also

ALTER TABLE, ALTER VIRTUALTABLE, ATAGINFO(), CREATE TABLE, CREATE VIEW, CREATE VIRTUALTABLE, DBF(), FILEINFO(), SELECT

Description

The TABLEINFO() function returns a pipe-separated string containing information about the table, virtual table or view specified in <expC>.

The following information is returned:

Table:

  • Type - 'Table'

View:

  • Type - 'View'
  • Select statement

Virtual Table:

  • Type - 'VirtualTable'
  • Alias name
  • Connection string
  • Keyfieldlist column list
  • Properties string
  • Select statement

Example

open database mytables
// Standard Lianja table
? tableinfo("ltable")
Table
// View
? tableinfo("lview")
View|select * from customers
// Virtual Table
? tableinfo("lvirtual")
VirtualTable|lvirtual|awhr|currencycode||select * from sales.currency