MySQL Pract 3
MySQL Pract 3
MySQL Practical-3
7.Display name and age where age is not between 23 and 26.
Mysql> use profile;
Mysql>select emp_name from emp_prof where not age between 23 and
26;
10. Display all records from table cust_prof where fname is ending with
alphabet s.
Mysql> use profile;
Mysql>select fname from cust_prof where fname like %s;
11. Display all records from table cust_prof where fname contains alphabet
z.
Mysql> use profile;
Mysql>select * from cust_prof where fname like %z%;
TYBCOM
12. Display all records from table cust_prof where lname contains alphabet
is.
Mysql> use profile;
Mysql>select * from cust_prof where lname like %is%;
13. Display all records from table cust_prof where uppercase A is present
in fname.
Mysql> use profile;
Mysql>select * from cust_prof where fname like binary %A%;
15. Display fname and lname from cust_prof table where 2nd character of
fname is a.(like _a%)
Mysql> use profile;
Mysql>select fname,lname from cust_prof where fname like _a%;
16. Display emp_names from emp_prof where 2nd last character of the
name is e. (like %e_)
Mysql> use profile;
Mysql>select emp_name from emp_prof where emp_name like %e_;
18. Display emp_name from emp_prof where name contains s first and
then i somewhere thereafter.
Mysql> use profile;
Mysql>select emp_name from emp_prof where emp_name like s%i%;