#SELECT * from employees WHERE dept LIKE "%Acc%" --syntaxx
CREATE table employees(
emp_id INT PRIMARY KEY AUTO_INCREMENT,
fname VARCHAR(50) NOT NULL,
lname VARCHAR(50) NOT NULL,
desig VARCHAR(50) NOT NULL DEFAULT 'Probation',
dept VARCHAR(50) NOT NULL
);
INSERT into employees (emp_id,fname,lname,desig,dept) VALUES (101,'Raju','Dwivedi','Manager','Loan');
INSERT into employees (fname,lname,desig,dept) VALUES ('Sham','Sundar','Cashier','Cash');
INSERT into employees (fname,lname,desig,dept) VALUES ('Paul','Tiwari','Asscociate','Loan');
INSERT into employees (fname,lname,desig,dept) VALUES ('Alex','Mishra','Accountant','Loan');
INSERT into employees (fname,lname,desig,dept) VALUES ('Victor','Tripathi','Asscociate','Deposit');
#The LIKE operator in SQL is used to search for a specified pattern in a column, often with % (any number of characters) and _ (single character) wildcards.
#SELECT * FROM employees where desig LIKE "%CASH%";
# five name who has length of four charcter
SELECT * FROM employees where fname LIKE "____";
SELECT * FROM employees WHERE fname LIKE "____"; -- Exactly four underscores, no spaces
#---- start from R
SELECT * FROM employees WHERE fname LIKE "R___"; -- Exactly four underscores, no spaces
To embed this project on your website, copy the following code and paste it into your website's HTML: