SQL beginners
174 subscribers
76 photos
2 videos
5 files
19 links
Download Telegram
Select DISTINCT Name, city from tblperson
tanlangan kolubdagilarni takrorlanmaydigan qatorlarini chiqarish
select bilan ishlatiladigan operatorlar
int va nvarchar li columblarni qo'shib chiqarish uchun int lini nvarcharga o'tqazish kerak
🔥2
🔥2
SELECT CASE
WHEN A + B > C AND B + C > A AND A + C > B THEN
CASE
WHEN A = B AND B = C THEN 'Equilateral'
WHEN A = B OR B = C OR A = C THEN 'Isosceles'
ELSE 'Scalene'
END
ELSE 'Not A Triangle'
END
FROM TRIANGLES;
Forwarded from Zahriddin_shavkatovich 🦅
Create database HR12
Create table
EMPLOYE(
Employe_ID int primary key,
Employe_FName nvarchar (99),
Employe_LName nvarchar (99),
Employe_hiredate date ,
Employe_Title nvarchar (99) default 'UNKNOWN'

)
insert into EMPLOYE(Employe_ID,Employe_FName,Employe_LName)
values (1213,'Hoshimjon','Roziyev')

select * from EMPLOYE

create table SKILL(
Skill_ID int identity (100,10) primary key,
Skill_Name nvarchar (99),
Skill_Description nvarchar (155)
)

Create table CERTIFIED(
Employe_ID int references EMPLOYE(Employe_ID),
Skill_ID int check (Skill_ID>99 and Skill_ID<221) references SKILL(Skill_ID),
Certified_Date date not null

)
Create database Store12
Create table Employe(
emp_code int identity primary key,
emp_title nvarchar(111),
emp_lname nvarchar(111),
emp_fname nvarchar(111),
emp_initial nvarchar(111) default ' ',
emp_dob date not null,
store_code int default 3
)
create table Region(
region_code int identity(1,1) primary key,
region_des nvarchar(111)
)
create table Store (
store_code int identity(1,1) primary key,
store_name nvarchar(111),
store_ytd_sales float check(store_ytd_sales>0),
region_code int references Region(region_code),
emp_code int references Employe(emp_code)

)

alter table Employe add constraint Employe_store_code_FK
foreign key (store_code) references Store (store_code)