-- -- create a table
-- CREATE TABLE students (
--   id INTEGER PRIMARY KEY,
--   name TEXT NOT NULL,
--   gender TEXT NOT NULL,
--   address TExt NOT NULL
  
-- );
-- -- insert some values
-- INSERT INTO students VALUES (1, 'Ryan', 'M','madapet');
-- INSERT INTO students VALUES (2, 'Joanna', 'F','kakinada');
-- -- fetch some values
-- -- SELECT * FROM students WHERE gender = 'F';
-- show databases;
CREATE TABLE emp (
    ID int NOT NULL,
    LastName varchar(255) NOT NULL,
    FirstName varchar(255) NOT NULL,
    Age int  NOT NULL,
    City varchar(255) DEFAULT 'hyderabad',
    Experience int NOT NULL
    CHECK (Experience>=2)
);
INSERT INTO emp VALUES (1, 'Ryan', 'M','20','hyderabad',5);
INSERT INTO emp VALUES (2, 'Joanna', 'F','30','hyderabad','4');
INSERT INTO emp VALUES (3, 'suri', 'F','35','hyderabad','6');
INSERT INTO emp VALUES (4, 'Joa', 'F','30','hyderabad','15');
INSERT INTO emp VALUES (5, 'anna', 'F','30','hyderabad','19');
INSERT INTO emp VALUES (6, 'rai', 'F','10','hyderabad','4');
INSERT INTO emp VALUES (7, 'ramesh', 'F','38','hyderabad','6');
INSERT INTO emp VALUES (8, 'suri', 'F','40','hyderabad','4');
INSERT INTO emp VALUES (9, 'suresh', 'F','30','hyderabad','8');
INSERT INTO emp VALUES (10, 'bob', 'F','23','hyderabad','4');
INSERT INTO emp VALUES (11, 'Jhonny', 'F','16','hyderabad','9');
INSERT INTO emp VALUES (12, 'Jhordan', 'F','13','hyderabad','4');
INSERT INTO emp VALUES (13, 'Javis', 'F','15','hyderabad','2');
INSERT INTO emp VALUES (14, 'babi', 'F','12','hyderabad','4');



SELECT ID,LastName,Age,Experience FROM emp

-- WHERE Experience between 2 and 19 and age=15
update emp set comm;