This document contains 11 SQL queries that select, insert, update, delete, and alter data in a student table. The queries filter students by criteria like age, marks, roll number, city, and course ID. They retrieve records that meet certain conditions, add a new record, update a field value, delete some records, and add a new column to the table.
This document contains 11 SQL queries that select, insert, update, delete, and alter data in a student table. The queries filter students by criteria like age, marks, roll number, city, and course ID. They retrieve records that meet certain conditions, add a new record, update a field value, delete some records, and add a new column to the table.
This document contains 11 SQL queries that select, insert, update, delete, and alter data in a student table. The queries filter students by criteria like age, marks, roll number, city, and course ID. They retrieve records that meet certain conditions, add a new record, update a field value, delete some records, and add a new column to the table.
This document contains 11 SQL queries that select, insert, update, delete, and alter data in a student table. The queries filter students by criteria like age, marks, roll number, city, and course ID. They retrieve records that meet certain conditions, add a new record, update a field value, delete some records, and add a new column to the table.
> 50 2. SELECT * FROM student WHERE cid=101 AND marks>1000 //reading 101 + having passing marks 3. SELECT * FROM student WHERE cid<>101 AND marks<1000 //not reading 101 and failed 4. INSERT INTO student VALUES(21,'Raza',1045,52,102) //add a new record 5. DELETE * FROM student WHERE rollno>=37 //delete last 3 records 6. UPDATE student SET cid=100 WHERE rollno=37 //update cid 7. ALTER TABLE student ADD city text //add city column 8. SELECT * FROM student WHERE city='Multan' //show all students belonging to Multan 9. SELECT * FROM student WHERE city<>'Multan' AND city='Chichawatni' //show all students not belonging to Multan and belonging to ______ 10. SELECT * FROM student WHERE age>=20 AND city='Multan' AND cid=101 //show all students having age>=20,belonging to Multan and reading 101 11. SELECT * FROM student WHERE age=20 AND marks=1094 //having similar age and marks