更新失败的语句:
UPDATE Updatetable1 SET t_name='N01' WHERE id=1;
注意测试要带索引啊
更新失败的语句:
UPDATE Updatetable1 SET t_name='N01' WHERE id=1;
注意测试要带索引啊
SELECT min(num),max(num),avg(num) FROM aggregation_func;
展示的列顺序不正确。
支持多表,但是没加多个字段的groupby
ID | SCORE | NAME
1 | 2 | B
3 | 1 | A
3 | 2 | C
3 | 4 | C
3 | 3 | D
3 | 2 | F
4 | 3 | C
你看下这个测试结果。这个case中,分别是按照id score 和name 升序排序的
不应该啊 github给的表和测试都过了,我再看看
多表查询,没有完全按照输入的列顺序展示。
给一个例子
SELECT * FROM Selecttables1,Selecttables2,Selecttables3 WHERE Selecttables1.uname=Selecttables2.uname AND Selecttables2.uname=Selecttables3.uname;
日期展示是乱码
1 | ^@^@^@^@^@^@^@^@21
2 | ^@^@^@^@^@^@^@^@21
9 | ^@^@^@^@^@^@^@^@19
见10楼
没有数据返回表头信息,不要返回'no data'
更新不存在的列时,程序挂了
您好,能帮看下 LLThomas 的 select-tables/aggregate 哪里有问题吗? 谢谢老师https://github.com/LLThomas/miniob
SELECT * FROM datetable WHERE udate<'2019-12-31';
CREATE INDEX indexid on datetable(u_date); 无法创建索引 ?聚合里面带了这个测试....
SELECT count(num) FROM aggregation_func;
结果不正确,应该是4行,返回了3
SELECT * FROM Selecttables1,Selecttables2,Selecttables3 WHERE Selecttables1.uname=Selecttables2.uname AND Selecttables2.uname=Selecttables3.uname;
返回的顺序不正确啊。顺序是:t1, t3, t2。应该是 t1,t2,t3
SELECT * FROM null_table where 1 is not null;
CREATE TABLE aggregation_func(id int, num int, price float, addr char, birthday date);
INSERT INTO aggregation_func VALUES (1, 18, 10.0, 'abc', '2020-01-01');
INSERT INTO aggregation_func VALUES (2, 15, 20.0, 'abc', '2010-01-11');
INSERT INTO aggregation_func VALUES (3, 12, 30.0, 'def', '2021-01-21');
INSERT INTO aggregation_func VALUES (4, 15, 30.0, 'dei', '2021-01-31');
SELECT Selecttables2.age FROM Selecttables1,Selecttables2 WHERE Selecttables1.age<18 AND Selecttables2.uname='c' AND Selecttables1.id=Selecttables_2.id;
SELECT min(num),max(num),avg(num) FROM aggregation_func;
Panlisong,麻烦老师看一下update、drop table测试有什么问题,谢谢老师
麻烦老师, 想问下对于多表查询, 第一条sql结果算正确吗, 还是需要去重?还有多表查询对于结果顺序有要求吗?
有索引,我在检查一下.测试不够肯定有原因的.