Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
27 views

Class 11 Cheatcode

ghjg

Uploaded by

neinhart001
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Class 11 Cheatcode

ghjg

Uploaded by

neinhart001
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

CREATE TABLE EMPLOYEE (


empId INTEGER PRIMARY KEY,
name TEXT NOT NULL,
dept TEXT NOT NULL,
salary int ,
city text not null,
dob date not null
);

-- insert
INSERT INTO EMPLOYEE VALUES (0001, 'aditya', 'software',20000, 'jaipur' , "2000-12-
27");
INSERT INTO EMPLOYEE VALUES (0002, 'chirag', 'mechanical', 50000, 'gurugram',
"1999-11-23");
INSERT INTO EMPLOYEE VALUES (0003, 'harshit', 'accounting', 10000, 'goa', "2002-04-
22");
insert into EMPLOYEE VALUES (0004, 'chinmay', 'HR', 30000, 'bhuvnasewar', "2007-07-
25");
select * from EMPLOYEE;
select name from EMPLOYEE where name like "c%";
select name from EMPLOYEE where name like "c______";
select dept from EMPLOYEE ;
select * from EMPLOYEE where salary='20000';
update EMPLOYEE set name='prateek' where name='harshit';
select * from EMPLOYEE ;

2.a=
{ "name":"aditya","class":11,"stream":"pcm","subject":"maths ,physics,chemistry,ip"
}
print(a)
a["car"]="BMW"
print(a)
for x in a:
print(x,":",a[x])
x=a.copy()
print(a)
a.pop("car")
print(a)
a.update({"car" : "rolls royce"})
print(a)
del a["subject"]
print(a)
print(len(a))

3. a=[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30]
b=[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,]
print(a)
print(b)
b.sort()
print("sort=",b)
a.append(b)
print("append =",a)
b.extend(a)
print("extend =",b)
a.clear()
print("clear =",a)
b.pop(3)
print("pop =",b)
a.insert(5, 300)
print("insert=",a)

4). rows =int(input("enter number of rows:"))


for i in range (rows+1):
for j in range(i):
print('1', end = '')
print()

5). CREATE TABLE EMPLOYEES


(
EmpCode INT(4),
EmpFName VARCHAR(15),
EmpLName VARCHAR(15),
Job VARCHAR(45),
Manager CHAR(4),
HireDate DATE,
Salary INT(6),
Commission INT(6),
DEPTCODE INT(2)
);

INSERT INTO EMPLOYEES


VALUES (9369, 'TONY', 'STARK', 'SOFTWARE ENGINEER', 7902, '1980-12-17', 2800,0,20),
(9499, 'TIM', 'ADOLF', 'SALESMAN', 7698, '1981-02-20', 1600, 300,30),
(9566, 'KIM', 'JARVIS', 'MANAGER', 7839, '1981-04-02', 3570,0,20),
(9654, 'SAM', 'MILES', 'SALESMAN', 7698, '1981-09-28', 1250, 1400, 30),
(9782, 'KEVIN', 'HILL', 'MANAGER', 7839, '1981-06-09', 2940,0,10),
(9788, 'CONNIE', 'SMITH', 'ANALYST', 7566, '1982-12-09', 3000,0,20),
(9839, 'ALFRED', 'KINSLEY', 'PRESIDENT', 7566, '1981-11-17', 5000,0, 10),
(9844, 'PAUL', 'TIMOTHY', 'SALESMAN', 7698, '1981-09-08', 1500,0,30),
(9876, 'JOHN', 'ASGHAR', 'SOFTWARE ENGINEER', 7788, '1983-01-12',3100,0,20),
(9900, 'ROSE', 'SUMMERS', 'TECHNICAL LEAD', 7698, '1981-12-03', 2950,0, 20),
(9902, 'ANDREW', 'FAULKNER', 'ANAYLYST', 7566, '1981-12-03', 3000,0, 10),
(9934, 'KAREN', 'MATTHEWS', 'SOFTWARE ENGINEER', 7782, '1982-01-23',
3300,0,20),
(9591, 'WENDY', 'SHAWN', 'SALESMAN', 7698, '1981-02-22', 500,0,30),
(9698, 'BELLA', 'SWAN', 'MANAGER', 7839, '1981-05-01', 3420, 0,30),
(9777, 'MADII', 'HIMBURY', 'ANALYST', 7839, '1981-05-01', 2000, 200, NULL),
(9860, 'ATHENA', 'WILSON', 'ANALYST', 7839, '1992-06-21', 7000, 100, 50),
(9861, 'JENNIFER', 'HUETTE', 'ANALYST', 7839, '1996-07-01', 5000, 100, 50);
select * from EMPLOYEES;
select name from EMPLOYEE where name like "c%";
select name from EMPLOYEE where name like "c______";
select dept from EMPLOYEE ;
select * from EMPLOYEE where salary='20000';
update EMPLOYEE set name='prateek' where name='harshit';
select * from EMPLOYEE ;

You might also like