Home » U++ Library support » U++ SQL » Database Scheme(*.sch): Can two tables share a field with the same field name?
Database Scheme(*.sch): Can two tables share a field with the same field name? [message #23450] |
Tue, 20 October 2009 21:14  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
DBMS is PostgreSQL.
db.sch
TABLE_(t_transaction)
SERIAL_ (transaction_id) PRIMARY_KEY
DATE_ (transaction_date)
STRING_ (transaction_description, 200)
INT_ (transaction_status)
STRING_ (transaction_no, 10)
END_TABLE
TABLE_(t_entry)
SERIAL_ (entry_id) PRIMARY_KEY
INT_ (transaction_id) //REFERENCES_(t_transaction)
BOOL_ (doc)
INT_ (account_id)
DOUBLE_ (amount)
END_TABLE
the INT_ (transaction_id) in the t_entry TABLE_ will make the program fail to compile. Do I need to put it to a separate *.sch files?
From reference/examples shipped with Upp, I know the PRIMARY_KEY can be all named ID without creating any problem.
Thanks for your help!
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 19:33:48 CEST 2025
Total time taken to generate the page: 0.01194 seconds
|