或两个表.
证书号码       证书类型(1--服务,2--海员.....)             签发地           签发日期           有效日期   证件类型表
type code
服务  1
海员  2

解决方案 »

  1.   

    create table haihonglove 
    (
    id  int ,
    名称 varchar(50),
    证书号码  varchar(50),
    签发地 varchar(50),
    签发日期  datetime,
    有效日期  datetime)insert into haihonglove
    select 1, '服务薄','445112456','AAAA','2007/05/08','2008/09/02' union all 
    select 1, '海员证','54535','BBBB','2007/05/08','2008/09/02'union all 
    select 1, '适任证书','5632135','CCCC','2007/05/08','2008/09/02'union all 
    select 1, 'GMDSS证书','5643453','ATTTA','2007/05/08','2008/09/02'union all 
    select 1, '护照','54645654','AAAdA','2007/05/08','2008/09/02'union all 
    select 1, '巴拿马证','654645','AAAdA','2007/05/08','2008/09/02'union all 
    select 1, '利证','65465465','AAAtA','2007/05/08','2008/09/02'union all 
    select 1, '森文证','6546456','AAAeA','2007/05/08','2008/09/02'union all 
    select 1, '美签','56546465','AAwAA','2007/05/08','2008/09/02'union all 
    select 1, '健康证','654654','AAAtA','2007/05/08','2008/09/02'select * from haihonglove
      

  2.   

    两个表 1.证书号码    证书类型(id)     签发地     签发日期     有效日期
    2.证书类型(id) 证书类型
      

  3.   


    create table haihonglove 
    (
    type_CD varchar(50),
    证书号码  varchar(50),
    签发地 varchar(50),
    签发日期  datetime,
    有效日期  datetime)
    drop table zhengtypecreate table zhengtype
    (
    type_CD int primary key not null,
    zheng_name varchar(50)
    )
      

  4.   

    发表于:2007-12-07 10:42:536楼 得分:0 
    补充一下     我要的是每个证都的加到数据库中呀   而不是选其中一个  
    ---------------------------------------
    如果证件固定更好办了,只需要创建库时将这几条证件记录插入,以后需要插入数据只需更新纪录就可以了create table haihonglove 
    (
    id  int ,
    名称 varchar(50),
    证书号码  varchar(50),
    签发地 varchar(50),
    签发日期  datetime,
    有效日期  datetime
    )
    insert into haihonglove
    select 1, '服务薄' union all 
    select 2, '海员证'  union all 
    select 3, '适任证书'  union all 
    select 4, 'GMDSS证书' union all 
    select 5 '护照'  union all 
    select 6, '巴拿马证' union all 
    select 7, '利证'   union all 
    select 8, '森文证'  union all 
    select 9, '美签'  union all 
    select 10, '健康证'