SQL主键和外键 [英] SQL Primary and Foreign key
本文介绍了SQL主键和外键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果您有表
A(主键)
B(主键(B,C))
和 C(主键(A,B1,B2,C)参照A(A),B(B),B(B),B(C))
你会怎么去上,并在适当的sqlite的定义它为Android?
how would you go on and define it in proper Sqlite for Android?
推荐答案
我想你会做:
C(a) references A(a)
C(b1, c) references B(b, c)
C(b2, c) references B(b, c)
不过,这是一个有点很难说没有数据的例子,知道哪些列和表的意思。
But it is a little hard to tell without examples of the data and knowing what the columns and tables mean.
这篇关于SQL主键和外键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文