摘要:
数据库外键关系表示的其实是一种一对多关系,所以处理一对多时可以使用外键。 阅读全文
posted @ 2020-11-18 11:12 sealong 阅读(152) 评论(0) 推荐(0)
|
|
|
|
摘要:
数据库外键关系表示的其实是一种一对多关系,所以处理一对多时可以使用外键。 阅读全文
posted @ 2020-11-18 11:12 sealong 阅读(152) 评论(0) 推荐(0)
摘要:
客户信息表(c CUSTOM)有以下字段:id、name、mobile 客户订单表(C_ORDER)有以下字段:id、custom_id、commodity、count、order _date Select * from c_order order by order_date desc limit 阅读全文
posted @ 2020-11-18 11:11 sealong 阅读(132) 评论(0) 推荐(0)
摘要:
a、尽可能使用更小的整数类型.(mediumint就比int更合适). b、尽可能的定义字段为not null,除非这个字段需要null. c、如果想要清空表的所有记录,建议用truncate table tablename而不是delete from tablename. d、避免出现SELECT 阅读全文
posted @ 2020-11-18 11:10 sealong 阅读(71) 评论(0) 推荐(0) |
|