School Revise · Class 11 Informatics Practices · Chapter 6
Code 065, Class 11. SQL builds and changes the tables of a database. Here we create tables, add rows, and change the table structure.
|
|
DDL commands define a table (CREATE, ALTER, DROP), and DML commands work with its rows (INSERT, UPDATE, DELETE).
CREATE TABLE makes a table with columns and their data types, such as INT, VARCHAR and DATE. A column can have a constraint like PRIMARY KEY or NOT NULL.
|
CREATE TABLE STUDENT ( rollno INT PRIMARY KEY, name VARCHAR(20), marks INT ); |
INSERT INTO adds a row, UPDATE changes values (with WHERE), and DELETE removes rows (with WHERE).
ALTER TABLE adds or changes a column, and DROP TABLE removes the whole table.
Explore the idea by tapping. The interactive opens right here in the lesson.
Type each one into the code lab above, then open the card to see the worked solution and its output.
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
CREATE TABLE.
INSERT INTO.
ALTER TABLE.
DROP TABLE.
|
DDL defines tables: CREATE TABLE makes a table with columns, data types (INT, VARCHAR, DATE) and constraints (PRIMARY KEY, NOT NULL); ALTER TABLE changes the structure and DROP TABLE removes it. DML works with rows: INSERT adds, UPDATE changes and DELETE removes, and UPDATE and DELETE use a WHERE clause. |
| Open the Virtual Lab |
These free Class 11 Informatics Practices notes explain SQL DDL and DML, creating tables with data types and constraints, INSERT UPDATE and DELETE, and ALTER and DROP TABLE with worked examples and practice, for CBSE students across India and the Gulf including the UAE, Saudi Arabia, Qatar, Oman, Kuwait and Bahrain.
© 2026 School Revise. All rights reserved. Original content aligned to the CBSE and NCERT Class 11 Informatics Practices syllabus. Unauthorised copying is not permitted.