mysql查询是 选择nl.ndc,formulary_status FROM bh.webdav_formulary_detail wfd INNER JOIN bh.payer_map pm ON wfd.payer_map_id = pm.payer_map_id INNER JOIN bh.ndc_lookup nl ON wfd.product_id = nl.uid WHERE pm.payer_id ='P00000000001001'和pm。 formulary_id ='01244'和nl.ndc in('16590061572','35356078830','35356078860','35356078890','49999085690','54868381500','54868381501','54868381503','54868381504','54868381505' ,'59011044010','59011044020','63629377401','63629377402','63629377403');
SHOW CREATE TABLE webdav_formulary_detail;
|表|创建表|
+ ------------------------- + ----------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------- +
| webdav_formulary_detail | CREATE TABLE webdav_formulary_detail
(
product_id
mediumint(8)unsigned NOT NULL,
formulary_status
char(2)NOT NULL,
file_iid
smallint(5)unsigned NOT NULL DEFAULT'0',
payer_map_id
smallint(5)unsigned NOT NULL,
KEY payer_map_id
(payer_map_id
),
KEY product_id
(product_id
)
)ENGINE = MyISAM DEFAULT CHARSET = latin1 |
SHOW CREATE TABLE ndc_lookup;
+ ------------ + ------------------------------------ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------------------- +
|表|创建表|
+ ------------ + ------------------------------------ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------------------- +
| ndc_lookup | CREATE TABLE ndc_lookup
(
uid
mediumint(8)unsigned NOT NULL,
ndc
char(11)NOT NULL DEFAULT'0',
PRIMARY KEY(uid
),
KEY uid
(uid
),
KEY ndc
(ndc
)
)ENGINE = MyISAM DEFAULT CHARSET = latin1 |
SHOW CREATE TABLE payer_map;
+ ----------- + ------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------- +
|表|创建表|
+ ----------- + ------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------- +
| payer_map | CREATE TABLE payer_map
(
payer_map_id
smallint(5)unsigned NOT NULL,
payer_id
varchar(80)DEFAULT NULL,
formulary_id
varchar(50)DEFAULT NULL,
alternate_id
varchar(50)DEFAULT NULL,
PRIMARY KEY(payer_map_id
),
KEY payer_map_id
(payer_map_id
),
KEY payer_id
(payer_id
),
KEY formulary_id
(formulary_id
),
KEY alternate_id
(alternate_id
)
)ENGINE = MyISAM DEFAULT CHARSET = latin1 |