select 语句的用法比较丰富,配合AntDB中的函数、表关联、group by、order by等关键字,高效完成用户的查询需求。
常用select语句:
- select * from t;
- select t1.col1,t1.col2 from t t1;
- select t1.col1,t1.col2 from t t1 where t1.col1 < 10
- select t1.col1,t2.col2 from a t1, b t2 where t1.id=t2.id;
- select t1.col1,count(*) from a t1group by t1.col1;
- select t1.col1,count(*) from a t1group by t1.col1 order by 2;