我在数据库(access)中有一个表a 字段有id(自动分配) title(文本) type(文本) 现在有几条记录 
     id     title   type 
     01       a       A 
     02       b       B 
     03       c       B 
     04       d       C 
     05       e       B 
我想取出所有type是B的记录的第一条,在此问题中就是 02       b       B 这条记录,请问语句怎么写? 

解决方案 »

  1.   

    不知道access支持top不?
    select top 1 * from a where type='b'
      

  2.   


    Select top 1 * From a Where Type='B'
    --这样就行了
      

  3.   


    select top 1 * from a where type='b'
      

  4.   

    SELECT TOP 1 * FROM @TABLE WHERE [type] = 'B' ORDER BY title
      

  5.   

    Select top 1 * From a Where Type='B'
    --这样就行了
      

  6.   

    不好意思 ,我以为是查询呢,知错就改update  A set path=stuff(path,1,charindex('x',path)-1,'12345')
    where path like '%x%'