Please enable JavaScript.
Coggle requires JavaScript to display documents.
SQL server (Structured Query Language) - Coggle Diagram
SQL server (Structured Query Language)
CREATE DATABASE
mỗi db là duy nhất
thực thi f5, excute
Bôi đen dòng nào thực thi dòng đó
k bôi đen thực thi cả file
Create
create database quanlynhanvien;
su dung database
use quanlynhanvien;
create Table
create table Phong_Ban(
Ma_pb varchar(5) not null,
Ten_PB varchar(255) null,
Ma_TruongPhong int null
);
Ví dụ
create table Nhan_Vien(
id_NV int not null,
ho_NV varchar(255) not null,
ten_NV varchar(255) not null,
nam_sinh date null,
dia_chi varchar(255) null,
gioi_tinh bit not null,
luong double null,
phong_ph varchar(5) null
);
create database quanlynhanvien;
use quanlynhanvien;
create table Phong_Ban(
Ma_pb varchar(5) not null,
Ten_PB varchar(255) null,
Ma_TruongPhong int null
);
drop table du_an;
create table Nhan_Vien(
id_NV int not null,
ho_NV varchar(255) not null,
ten_NV varchar(255) not null,
nam_sinh date null,
dia_chi varchar(255) null,
gioi_tinh bit not null,
luong double null,
phong_ph varchar(5) null
);
create table Du_An(
ma_duan varchar(5) not null,
ten_duan varchar(255) null,
date_batdau date null,
date_end date null
);
create table QuanLy_DuAn(
ma_duan varchar(5) not null,
ma_NV int not null,
date_tham_gia datetime null,
date_ket_thuc datetime null,
so_gio int null,
vai_tro varchar(255) null
);
Earse(Xoa toan bo)
drop database quanlynhanvien;
Go bang cua BD
drop table phong_ban
Xoa cac du lieu trong table
Alter(Add)
ALTER TABLE HocSinh ADD NgaySinh date
Datatypes Operator(Toán tử)