-
Notifications
You must be signed in to change notification settings - Fork 1
/
²åÈëÊý¾Ý.sql
115 lines (89 loc) · 5.52 KB
/
²åÈëÊý¾Ý.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#向user用户表插入数据
INSERT INTO USER(user_no,user_realname,user_password,user_nickname,user_sex,user_phone,user_type,user_photo,
user_job,user_address_province,user_address_city,user_mood,user_mail,user_introduct,user_birthday,user_idcard)
VALUE('131006326','王韶辉','123456','哈哈哈','男','130xxxx8112',1,'g:\\1.png','学生','江苏省','苏州市',
'今天天气不错','123456@qq.com','专业敲代码','1993-08-06','410802xxxxxxxxxx10')
INSERT INTO USER(user_no,user_realname,user_password,user_nickname,user_sex,user_phone,user_type,user_photo,
user_job,user_address_province,user_address_city,user_mood,user_mail,user_introduct,user_birthday,user_idcard)
VALUE('131007136','张丰鸽','123456','哈哈哈','女','159xxxx8112',1,'g:\\1.png','学生','江苏省','苏州市',
'今天天气不美','123456@qq.com','专业UI','1993-08-06','410202xxxxxxxxxx25')
#向user_hobby爱好表插入数据INSERT INTO hobby(hobby_name) VALUE('音乐');
INSERT INTO hobby(hobby_name) VALUE('运动');
INSERT INTO hobby(hobby_name) VALUE('读书');
INSERT INTO hobby(hobby_name) VALUE('音乐');
INSERT INTO hobby(hobby_name) VALUE('旅游');
INSERT INTO hobby(hobby_name) VALUE('看电视');
INSERT INTO hobby(hobby_name) VALUE('逛街');
INSERT INTO hobby(hobby_name) VALUE('品茶');
INSERT INTO hobby(hobby_name) VALUE('收藏');
INSERT INTO hobby(hobby_name) VALUE('网购');
INSERT INTO hobby(hobby_name) VALUE('打游戏');
INSERT INTO hobby(hobby_name) VALUE('滑雪');
INSERT INTO hobby(hobby_name) VALUE('摄影');
#向user_hobby用户爱好关系表插入数据
INSERT INTO user_hobby(user_id,hobby_id) VALUE(1,1);
INSERT INTO user_hobby(user_id,hobby_id) VALUE(1,2);
INSERT INTO user_hobby(user_id,hobby_id) VALUE(1,3);
#向user_linkman常用联系人信息表插入数据
INSERT INTO user_linkman(user_id,NAME,idcard) VALUE(1,'张丰鸽','410202xxxxxxxxxx25')
#向friend好友表插入数据
INSERT INTO friend(user_id,friend_id) VALUE(1,2)
#向message聊天消息表插入数据
INSERT INTO message(message_sender_id,message_receiver_id,message_time,message_content,message_image,message_isread)
VALUE(1,2,'2016-4-13','hello','g:\\1.png','01')
#向news说说表插入数据
INSERT INTO news(news_sender_id,news_content,news_time,news_stars,news_views)
VALUE(1,'今天起得真早啊!!!','2016-4-13',2,10)
#向news_photo说说表插入数据
INSERT INTO news_photo(news_id,news_path) VALUE(1,'g:\\1.png')
#向comment评论表插入数据
INSERT INTO COMMENT(comment_news_id,comment_user_id,comment_content,comment_time)
VALUE(1,2,'是啊,你起得真早!','2016-04-13')
#向reply回复表插入数据
INSERT INTO reply(reply_comment_id,reply_user_id,reply_respondent_id,reply_content,reply_time)
VALUE(1,1,2,'哈哈哈','2016-04-13')
#向user_wallet钱包表插入数据
INSERT INTO user_wallet(user_id,alipay_no,user_wallet_score,user_wallet_money)
VALUE(1,'123456789',1000,99999999.00)
#向system_message系统消息表插入数据
INSERT INTO system_message(user_id,system_message_content,system_message_linkorder,system_message_linkuser)
VALUE(1,'您有一条新的订单',1,2)
#向house房源信息表插入数据
INSERT INTO house(user_id,house_title,house_describe,house_style,house_address_province,house_address_city,
house_traffic,house_most_num,house_one_price,house_add_price,house_limit_sex,house_stay_time,house_assess_sum)
VALUE(1,'苏州豪华别墅','靠近学习场所','别墅','江苏省','苏州市','交通便利',5,50.00,10.00,'不限',5,2)
#向house_photo房源图片表插入数据
INSERT INTO house_photo(house_id,house_photo_path) VALUE(1,'g:\\1.png')
#向house_collect收藏房源表插入数据
INSERT INTO house_collect(user_id,house_id) VALUE(1,1)
#向house_date_manage日期管理表插入数据
INSERT INTO house_date_manage(house_id,date_not_use) VALUE(1,'2016-4-14')
DELETE FROM house_date_manage WHERE house_id= 1 AND date_not_use="2016-06-25";
SELECT * FROM house_date_manage WHERE house_id = 2;
#向house_equipment房屋设施表插入数据
INSERT INTO equipment(equipment_name) VALUE('空调');
INSERT INTO equipment(equipment_name) VALUE('电视机');
INSERT INTO equipment(equipment_name) VALUE('冰箱');
#向house_equipment房屋设施表插入数据
INSERT INTO house_equipment(house_id,equipment_id) VALUE(1,1);
INSERT INTO house_equipment(house_id,equipment_id) VALUE(1,2);
INSERT INTO house_equipment(house_id,equipment_id) VALUE(1,3);
#向hot_city热门城市表插入数据
INSERT INTO hot_city(hot_city_name,hot_city_num) VALUE('苏州',35)
INSERT INTO hot_city(hot_city_name,hot_city_num) VALUE('上海',54)
#向orders订单表插入数据
INSERT INTO orders(house_id,user_id,checknum,checkname,checktime,leavetime,total,tel,order_state)
VALUE(1,1,4,'王韶辉','2016-04-13','2016-04-16',100.00,'130xxxx4954','待确认')
DELETE FROM orders WHERE order_id=1
#向user_order_linkman订单使用联系人信息表插入数据
INSERT INTO user_order_linkman(order_id,NAME,idcard) VALUE(2,'王韶辉','410802xxxxxxxxxx10')
#向assess评价表表插入数据
INSERT INTO assess(order_id,house_id,user_id,star,assess_content) VALUE(2,1,1,4,'总体来说还不错!');
#向checks签到表插入数据
INSERT INTO checks(user_id,check_sum,check_last_time) VALUE(1,2,'2016-04-13')
#向admin管理员表插入数据
INSERT INTO admin(admin_name,admin_password) VALUE('admin','admin')
SELECT * FROM house WHERE house_address_city ="苏州市"
AND house_style LIKE "客厅沙发" AND house_limit_sex LIKE "限男生"
AND house_stay_time LIKE "%" ORDER BY house_one_price ;
DELETE FROM house_date_manage WHERE date_not_use < CURRENT_DATE;