Add Table Structure for Drug Monitoring

Source: Internet
Author: User

/* Modify the return information table field in the upload information table */
/* Add a primary key */
Alter table sun_jk_thxx add lsh char (30)
Alter table sun_jk_thxx add qymc char (50)
Alter table sun_jk_thxx add updatetime datetime
Alter table sun_jk_thxx alter column SPM char (32)
Alter table sun_jk_thxx alter column pzwh char (32)

Alter table sun_jk_thxx add updatetime datetime
Alter table [DBO]. [sun_jk_thxx] With nocheck add default (getdate () for [updatetime]

Create index [sun_jk_thxx_areabm] on [DBO]. [sun_jk_thxx] ([areabm]) on [primary]
Create index [sun_jk_thxx_qydm] on [DBO]. [sun_jk_thxx] ([qydm]) on [primary]
Create index [sun_jk_thxx_lsh] on [DBO]. [sun_jk_thxx] ([lsh]) on [primary]
Create unique index [sun_jk_thxx_lsh_key] on [DBO]. [sun_jk_thxx] ([areabm], [qydm], [lsh]) on [primary]
Go

/* Loss report table */
Alter table sun_jk_bsjl add lsh char (30)
Alter table sun_jk_bsjl add qymc char (50)
Alter table sun_jk_bsjl add ypm char (32)
Alter table sun_jk_bsjl add Gg char (20)
Alter table sun_jk_bsjl add ypcj char (30)
Alter table sun_jk_bsjl add zxdw char (4)
Alter table sun_jk_bsjl add pzwh char (40)
Alter table sun_jk_bsjl add updatetime datetime
Alter table [DBO]. [sun_jk_bsjl] With nocheck add default (getdate () for [updatetime]
Create index [sun_jk_bsjl_lsh] on [DBO]. [sun_jk_bsjl] ([lsh]) on [primary]
Create index [sun_jk_bsjl_areabm] on [DBO]. [sun_jk_bsjl] ([areabm]) on [primary]
Create index [sun_jk_bsjl_qydm] on [DBO]. [sun_jk_bsjl] ([qydm]) on [primary]
Create unique index [sun_jk_bsjl_lsh_key] on [DBO]. [sun_jk_bsjl] ([areabm], [qydm], [lsh]) on [primary]

Go

/* Maintenance records */
Alter table sun_jk_yhjl add lsh char (30)
Alter table sun_jk_yhjl add qymc char (50)
Alter table sun_jk_yhjl add ypm char (32)
Alter table sun_jk_yhjl add Gg char (20)
Alter table sun_jk_yhjl add ypcj char (30)
Alter table sun_jk_yhjl add zxdw char (4)
Alter table sun_jk_yhjl add pzwh char (40)
Alter table sun_jk_yhjl add updatetime datetime
Alter table [DBO]. [sun_jk_yhjl] With nocheck add default (getdate () for [updatetime]
Create index [sun_jk_yhjl_lsh] on [DBO]. [sun_jk_yhjl] ([lsh]) on [primary]
Create index [sun_jk_yhjl_areabm] on [DBO]. [sun_jk_yhjl] ([areabm]) on [primary]
Create index [sun_jk_yhjl_qydm] on [DBO]. [sun_jk_yhjl] ([qydm]) on [primary]
Create unique index [sun_jk_yhjl_lsh_key] on [DBO]. [sun_jk_yhjl] ([areabm], [qydm], [lsh]) on [primary]
Go

/* Initial Drug record */
Alter table sun_jk_syyp add lsh char (30)
Alter table sun_jk_syyp add qymc char (50)
Alter table sun_jk_syyp alter column ghdw char (80)
Alter table ssun_jk_syyp add updatetime datetime
Alter table [DBO]. [sun_jk_syyp] With nocheck add default (getdate () for [updatetime]
Create index [sun_jk_syyp_lsh] on [DBO]. [sun_jk_syyp] ([lsh]) on [primary]
Create index [sun_jk_syyp_areabm] on [DBO]. [sun_jk_syyp] ([areabm]) on [primary]
Create index [sun_jk_syyp_qydm] on [DBO]. [sun_jk_syyp] ([qydm]) on [primary]
Create unique index [sun_jk_syyp_lsh_key] on [DBO]. [sun_jk_syyp] ([areabm], [qydm], [lsh]) on [primary]
Go

/* Initial enterprise record */
Alter table sun_jk_syqy add lsh char (30)
Alter table sun_jk_syqy add dw_qymc char (50)
Alter table sun_jk_syqy add updatetime datetime
Alter table [DBO]. [sun_jk_syqy] With nocheck add default (getdate () for [updatetime]
Create index [sun_jk_syqy_lsh] on [DBO]. [sun_jk_syqy] ([lsh]) on [primary]
Create index [sun_jk_syqy_areabm] on [DBO]. [sun_jk_syqy] ([areabm]) on [primary]
Create index [sun_jk_syqy_qydm] on [DBO]. [sun_jk_syqy] ([qydm]) on [primary]
Create unique index [sun_jk_syqy_lsh_key] on [DBO]. [sun_jk_syqy] ([areabm], [qydm], [lsh]) on [primary]
Go

/* Upload supply and marketing information */
Alter table fg_yj_up_data add areabm char (6)
Alter table fg_yj_up_data add updatetime datetime
Alter table fg_yj_up_data add ypcj char (30)/* pharmaceutical manufacturer */
Alter table fg_yj_up_data add ysrq datetime/* acceptance date */
Alter table fg_yj_up_data add ysry char (20)/* acceptance pharmacist */
Alter table fg_yj_up_data add zlzh char (30)/* quality status */
Alter table [DBO]. [fg_yj_up_data] With nocheck add default (getdate () for [updatetime]
Create index [fg_yj_up_data_lsh] on [DBO]. [fg_yj_up_data] ([lsh]) on [primary]
Create index [fg_yj_up_data_areabm] on [DBO]. [fg_yj_up_data] ([areabm]) on [primary]/* region code */
Create index [fg_yj_up_data_qydm] on [DBO]. [fg_yj_up_data] ([bdqqh]) on [primary]/* pharmacy Code */
Create unique index [fg_yj_up_data_lsh_key] on [DBO]. [fg_yj_up_data] ([areabm], [bdqqh], [lsh]) on [primary]

/**/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.