0% found this document useful (0 votes)
4 views

Google Cloud Platform

Ư

Uploaded by

Kiều Mai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Google Cloud Platform

Ư

Uploaded by

Kiều Mai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

)

create table tbNhaCc


(
MaNhaCc nchar (3) not null,
TenNhaCc nvarchar(30)not null,
DiaChi nvarchar(250),
DienThoai nvarchar(20)
)

alter table tbNhaCc


add constraint PK_NhaCc_MaNcc Primary key
(MaNhaCc),
constraint unq_NhaCc_DiaChi Unique (DiaChi),
constraint def_NhaCc_DienThoai Default N'Chưa có' for
DienThoai

alter table tbNhaCc


drop constraint unq_NhaCc_DiaChi,
def_NhaCc_DienThoai

alter table tbDonDh


nocheck constraint chk_DonDh_NgayDkNh

alter table tbDonDh


with check check constraint chk_DonDh_NgayDkNh
alter table CtDh
add SlDh int

alter table CtDh


add constraint def_CtDh_SlDh default 0 for SlDh

alter table CtDh


add DgBan int

create table PhongBan


(
MaPB char(10) not null,
TenPB nvarchar(50),
)

alter table tbNhanVien


add MaPB char(10) not null

alter table PhongBan


add constraint PK_PhongBan_MaPB primary key
(MaPB)

alter table tbNhanVien


add constraint FK_NhanVien_MaPB foreign key (MaPB)
references PhongBan(MaPB)

alter table tbNhanVien


drop constraint FK_NhanVien_MaPB

You might also like