Saurav Kumar
Saurav Kumar

Reputation: 583

How to join two tables in HTSQL specific to any columns

HTSQL works when two tables are properly linked with foreign key.

For example:

school can be easily joined with department if we have properly defined a foreign key say school_code of department table referencing code of school.

So far I'm not able to find any way to join two tables on some other columns.

Can any one help me how to do this in HTSQL?

Upvotes: 1

Views: 105

Answers (1)

Catherine Devlin
Catherine Devlin

Reputation: 7743

The tweak.override extension allows you to define foreign-keys in a config file even if they're not present in the database itself. http://htsql.org/doc/admin/usage.html#extension-reference

tweak.override:
  foreign-keys:
    - program(school_code) -> school(code)
    - program(school_code, part_of_code) -> program

Upvotes: 1

Related Questions