如题

解决方案 »

  1.   

    select count(col) from tbselect count(distinct col) from tb两个数相同,则唯一.
      

  2.   

    select count(col) from tb select count(distinct col) from tb 两个数相同,则唯一.
    这条SQL无结果,则COL唯一
    select col from tb group by col having count(1) > 1
      

  3.   

    我的意思是 比如user表name是unique类型(我并不知道user表有哪些列是unique的),我通过表名user怎么找到unique属性的列“name”。也就是输入:“user”;输出是“name”
      

  4.   

    sp_help 'tb'这样就能看表的信息了
      

  5.   

    invalid SQL statement: sp_help users