SQL_1

作者: 艾马丫 | 来源:发表于2019-06-25 22:56 被阅读0次
fig. 1

1. select ID,name from school.teacher limit 7;

2. select ID,age from school.teacher order by age desc, ID;

3. select ID,age,country from school.teacher where ((age > 50) or (age < 30))  and country in( 'China', 'Canada');

4. select * from school.teacher where name like 'B%';  #不区分大小写,B%表示以B开头的任意字符

5. select ID, length(rtrim(ltrim(name))) as len_name,country from school.teacher;

6. select curdate(), curdate(), dayofweek(curdate());

7. select avg(age), max(age),min(age) from school.teacher where age>30;

8. select distinct age from school.teacher;

相关文章

  • SQL_1

    1. select ID,name from school.teacher limit 7; 2.select I...

网友评论

      本文标题:SQL_1

      本文链接:https://www.haomeiwen.com/subject/gihfcctx.html