请问大家
    SQL中
* 表示(乘)两个表达式相乘(算术乘法运算符)。
那么在下面两条命令中 (*) 和* 各自代表着什么意思呢?
select count(*) from 表 where len(字段)<>11 or (字段 not like '13%' and 字段 not like '15%') 
select * from 表 where 字段 in (select 字段 from 表 group by 字段 having count(字段)>1)

解决方案 »

  1.   

    这里面的*代表所有栏位,
    建议方式是,
    count(*)中使用具体的栏位名称或者说count(1)之类的代替,
    而select * from 中的 *,如果栏位不是很多的话,建议使用具体的栏位代替,
    如果栏位多了,使用*和使用栏位的效果是一样的.
      

  2.   

    select count(*) from 表 where len(字段) <>11 or (字段 not like '13%' and 字段 not like '15%') 
    这里的*代表所有数据.不忽略空值(NULL)
    select * from 表 where 字段 in (select 字段 from 表 group by 字段 having count(字段)>1) 
    这里的*代表,表中的所有字段.
      

  3.   

    select 2*2 result
    /*
    result
    -----
     4
    */
    这里的*,代表乘法.
      

  4.   


    我不太明白
    select * from 表 where 字段 in (select 字段 from 表 group by 字段 having count(字段)>1) 
    这里的*代表,表中的所有字段.
    这里面我已经有字段了,为什么还要表中的所有字段呢?
      

  5.   

    哦 还有
    select * from 表 where 字段 in (select 字段 from 表 group by 字段 having count(字段)>1) 
    这里group by不是 指定用来放置输出行的组的意思把
      

  6.   

    不告诉sql你是要select哪些字段,他怎么显示出来啊
    而且,他说的字段,不是select 语句里面你写的那个汉字字段
      

  7.   


    看看联机帮助的select语法。orz