@Sai_kiran_rachakonda
recursion (sum of natural numbers)
·
Python
Python
recursion 1 to N
·
Python
Python
recursion fact
·
Python
Python
example
·
Python
Python
recursion pow
·
Python
Python
recursion fact
·
Python
Python
sort (half)
·
Python
Python
example
updated
·
Python
Python
create table Doctor(
Did int primary key,
Dname varchar(25),
specialization varchar(20) default 'general',
Adhar_no varchar(12) unique,
consultation_fee numeric(5,2) constraint c1 check(consultation_fee > 50)
);
insert into Doctor values('D_100', 'XYZ', 'ENT', 12334, 150);
insert into Doctor values('D_101', 'PQR', 'ORTHO', 12455, 200);
insert into Doctor values('D_102', 'LMN', 'ENT', 12256, 150);
doctor- special_fee
·
SQL
SQL
create table Doctor(
Did int primary key,
Dname varchar(25),
specialization varchar(20) default 'general',
Adhar_no varchar(12) unique,
consultation_fee numeric(5,2) constraint c1 check(consultation_fee > 50)
);
insert into Doctor values('D_100', 'XYZ', 'ENT', 12334, 150);
insert into Doctor values('D_101', 'PQR', 'ORTHO', 12455, 200);
insert into Doctor values('D_102', 'LMN', 'ENT', 12256, 150);
doctor- special_fee
·
SQL
SQL
create table Doctor(
Did int primary key,
Dname varchar(25),
specialization varchar(20) default 'general',
Adhar_no varchar(12) unique,
consultation_fee numeric(5,2) constraint c1 check(consultation_fee > 50)
);
insert into Doctor values('D_100', 'XYZ', 'ENT', 12334, 150);
insert into Doctor values('D_101', 'PQR', 'ORTHO', 12455, 200);
insert into Doctor values('D_102', 'LMN', 'ENT', 12256, 150);
doctor
·
SQL
SQL
create table Doctor(
Did int primary key,
Dname varchar(25),
specialization varchar(20) default 'general',
Adhar_no varchar(12) unique,
consultation_fee numeric(5,2) constraint c1 check(consultation_fee > 50)
);
insert into Doctor values('D_100', 'XYZ', 'ENT', 12334, 150);
insert into Doctor values('D_101', 'PQR', 'ORTHO', 12455, 200);
insert into Doctor values('D_102', 'LMN', 'ENT', 12256, 150);
doctor- special_face
·
SQL
SQL
create table Doctor(
Did int primary key,
Dname varchar(25),
specialization varchar(20) default 'general',
Adhar_no varchar(12) unique,
consultation_fee numeric(5,2) constraint c1 check(consultation_fee > 50)
);
insert into Doctor values('D_100', 'XYZ', 'ENT', 12334, 150);
insert into Doctor values('D_101', 'PQR', 'ORTHO', 12455, 200);
insert into Doctor values('D_102', 'LMN', 'ENT', 12256, 150);
doctor
·
SQL
SQL
create table Doctor(
Did int primary key,
Dname varchar(25),
specialization varchar(20) default 'general',
Adhar_no varchar(12) unique,
consultation_fee numeric(5,2) constraint c1 check(consultation_fee > 50)
);
insert into Doctor values('D_100', 'XYZ', 'ENT', 12334, 150);
insert into Doctor values('D_101', 'PQR', 'ORTHO', 12455, 200);
insert into Doctor values('D_102', 'LMN', 'ENT', 12256, 150);
doctor, patient, treat
·
SQL
SQL
create table Patient(
Pid int primary key,
Pname varchar(25),
DOB date,
Address varchar(20)
);
insert into Patient values('p_100', 'Adhi', '12-07-1999', 'cvvd');
insert into Patient values('p_101', 'Bosco', '02-03-2000', 'uythk');
insert into Patient values('p_102', 'Dylan', '18-09-0989', 'njkl');
insert into Patient values('p_103', 'Elma', '22-01-2000', 'mkjgx');
doctor, patient, treat
·
SQL
SQL
create table Patient(
Pid int primary key,
Pname varchar(25),
DOB date,
Address varchar(20)
);
insert into Patient values('p_100', 'Adhi', '12-07-1999', 'cvvd');
insert into Patient values('p_101', 'Bosco', '02-03-2000', 'uythk');
insert into Patient values('p_102', 'Dylan', '18-09-0989', 'njkl');
insert into Patient values('p_103', 'Elma', '22-01-2000', 'mkjgx');
doctor, patient, treat
·
SQL
SQL
create table Patient(
Pid int primary key,
Pname varchar(25),
DOB date,
Address varchar(20)
);
insert into Patient values('p_100', 'Adhi', '12-07-1999', 'cvvd');
insert into Patient values('p_101', 'Bosco', '02-03-2000', 'uythk');
insert into Patient values('p_102', 'Dylan', '18-09-0989', 'njkl');
insert into Patient values('p_103', 'Elma', '22-01-2000', 'mkjgx');
doctor, patient, treat
·
SQL
SQL
create table Patient(
Pid int primary key,
Pname varchar(25),
DOB date,
Address varchar(20)
);
insert into Patient values('p_100', 'Adhi', '12-07-1999', 'cvvd');
insert into Patient values('p_101', 'Bosco', '02-03-2000', 'uythk');
insert into Patient values('p_102', 'Dylan', '18-09-0989', 'njkl');
insert into Patient values('p_103', 'Elma', '22-01-2000', 'mkjgx');
Treat
·
SQL
SQL
create table Treat(
Did int references Doctor(Did) on delete cascade,
Pid int references Patient (Pid) on delete set null,
Diagnosis varchar(30) not null,
treat_id int,
treat_date date
);
insert into Treat values('D_100', 'p_100', 'aaa', 1, '03-11-2000');
insert into Treat values('D_101', 'p_101', 'bbb', 2, '04-11-2010');
insert into Treat values('D_102', 'p_102', 'ccc', 3, '05-11-2009');
Treat
·
SQL
SQL
create table Treat(
Did int references Doctor(Did) on delete cascade,
Pid int references Patient (Pid) on delete set null,
Diagnosis varchar(30) not null,
treat_id int,
treat_date date
);
insert into Treat values('D_100', 'p_100', 'aaa', 1, '03-11-2000');
insert into Treat values('D_101', 'p_101', 'bbb', 2, '04-11-2010');
insert into Treat values('D_102', 'p_102', 'ccc', 3, '05-11-2009');