CREATE TABLE student ( sid INTEGER PRIMARY KEY, name VARCHAR(30) NOT NULL, gender CHAR(1) NOT NULL, deptid INTEGER NOT null, salary INTEGER NOT null, joindate DATE ); -- create a department table create table department( deptid INTEGER PRIMARY key, deptname VARCHAR(10) NOT null ); -- insert some student values INSERT INTO student VALUES (1, 'adnan', 'M',1,5000,'2020-04-27'), (2, 'turjoy', 'F',2,6000,'2015-04-27'), (3, 'helal', 'F',2,2000,'2017-04-27'), (4, 'shovon', 'F',1,9000,now()), (5, 'rajib', 'M',1,8000,'2012-04-27'), (6, 'rinku', 'M',3,15000,'2011-04-27'), (7, 'alif', 'F',3,17000,'2017-04-27'); -- insert some student values insert into department values(1,"CSE"),(2,"EEE"),(3,"CIVIL"); select * from student where deptid <> 2; -- not deptid 2
To embed this project on your website, copy the following code and paste it into your website's HTML: