Difference between revisions of "TABLEINFO()"

From Lianjapedia
Jump to: navigation, search
(Created page with "==Purpose== Function to return information about a table, virtual table or view ==Syntax== TABLEINFO(<expC>) ==See Also== ALTER TABLE, ALTER VIRTUALTABLE, [[CREATE T...")
 
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[ALTER TABLE]], [[ALTER VIRTUALTABLE]], [[CREATE TABLE]], [[CREATE VIEW]], [[CREATE VIRTUALTABLE]], [[DBF()]], [[FILEINFO()]], [[FSIZE()]], [[GETENV()]], [[NDX()]], [[SET FULLPATH]]
+
[[ALTER TABLE]], [[ALTER VIRTUALTABLE]], [[CREATE TABLE]], [[CREATE VIEW]], [[CREATE VIRTUALTABLE]], [[DBF()]], [[FILEINFO()]], [[SQL SELECT|SELECT]]
  
 
==Description==
 
==Description==

Revision as of 06:42, 15 April 2013

Purpose

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

Syntax

TABLEINFO(<expC>)

See Also

ALTER TABLE, ALTER VIRTUALTABLE, 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