Virtual Tables - Lianja Cloud Server

From Lianjapedia
Revision as of 09:25, 28 January 2015 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Under Construction

See Also


Primary Key

Modify Virtual Table: Primary Key


Virtual tables used with the Lianja Cloud Server must have a unique primary key specified in the virtual table definition.

See Virtual Tables for an introduction to virtual table creation. To add a primary key to an existing virtual table, open the database in the Data Workspace, select the virtual table name then right-click Modify virtual table ... to open the dialog and add the key.




Primary Key


The primary key can also be specified in the CREATE VIRTUALTABLE and ALTER VIRTUALTABLE commands.

Note: keyfieldlist and primarykey are synonymous.


// create virtual table and specify primary key
create virtualtable vt_actors connstr "lianja_mysqltest" alias "vt_actors" primarykey "actor_id";
       properties "keepalive=1;rowid=1" as select * from actor 
// or alter an existing virtual table
alter virtualtable vt_actors primarykey "actor_id"
// keyfieldlist and primarykey are synonymous
alter virtualtable vt_actors keyfieldlist "actor_id"

Demo App

Creating the cloudlibtest database to run the example_webvirtualtables App ... coming soon.