• 2021-04-14
    假定用户表user中存在一个字段age,现要 "查询年龄为18或20的用户" ,下面SQL语句中,正确的是
  • select * from user where age = 18 or age = 20;

    内容

    • 0

      假定users表中存在一个年龄字段age,下面选项中,能够获得最小年龄值的SQL语句是 A: selectmin(age)fromusers; B: selectagefromusersorderbyageasclimit1,1; C: selectmax(age)fromusers; D: selectagefromusersorderbyageasclimit0,1;

    • 1

      在SQL语句中要查询表s在AGE字段上取空值的记录,正确的SQL语句为:SELECT*FROMsWHERE()。

    • 2

      假定user表中有一个username字段。 下面选项,可以给username字段添加一个un别名的SQL语句是

    • 3

      已知有一张user表,表中有字段id、name、age、sex、address。请写出两种查询表中所有字段信息的SQL语句

    • 4

      假定用户表user有多列,其中字段id中没有null值,字段username中存在null值。下面选项中,不能获得user表的总记录数的SQL语句是( ) A: select count(*) from user; B: select count(id) from user; C: select count(username) from user; D: select count(id) from user where1=1;