JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
28 days ago3 views
👨‍💻Programming
CREATE TABLE employee (
    empid INT PRIMARY KEY,
    name VARCHAR(20),
    department VARCHAR(20),
    salary INT,
    joining_date DATE
);
    
		INSERT INTO employee(empid, name, department, salary, joining_date) VALUES
        (10,"sarthak","CSE",9000,'2026-08-25'),
		(11,"s1","sales",10000,'2026-08-26'),
		(12,"s2","accounts",11000,'2026-08-27'),
		(13,"s3","marketing",12000,'2026-08-28'),
        (14,"s1","operations",13000,'2026-08-29'),
		(15,"s5","HR",14000,'2026-08-30'),
		(16,"s1","teaching",15000,'2026-09-02'),
		(17,"s7","IT",16000,'2026-09-03');
        
        SELECT * FROM employee WHERE department = "sales";
        
        UPDATE employee SET salary = salary*1.10 WHERE empid = 13;
        SELECT * FROM employee WHERE empid =13 ;
        
        
        
        SELECT COUNT(*) FROM employee;




CREATE TABLE students241 (
    rollno INT PRIMARY KEY,
    name VARCHAR(20),
    subject VARCHAR(20),
    marks INT,
    grade VARCHAR(5)
);
    
		INSERT INTO students241(rollno, name, subject, marks, grade) VALUES
        
        (10,"sarthak","maths",78,'A'),
		(12,"s2","science",68,'B'),
        (13,"s3","hindi",58,'C'),
		(14,"s4","english",48,'D'),
        (15,"s5","computer",38,'E');
        
        SELECT * FROM students241 where marks >55 order by marks desc;
		UPDATE students241 SET grade ='F' WHERE marks<50;
                SELECT * FROM students241;
← Back to timeline