Tuesday, 10 July 2018
Subscribe to:
Post Comments (Atom)
mysql> Select * from Student; +------+---------+---------+-----------+ | Id | Name | Address | Subject | +------+---------+---------+-----------+ | 1 | Gaurav | Delhi | Computers | | 2 | Aarav | Mumbai | History | | 15 | Harshit | Delhi | Commerce | | 20 | Gaurav | Jaipur | Computers | | 21 | Yashraj | NULL | Math | +------+---------+---------+-----------+ 5 rows in set (0.02 sec)
mysql> select name, INSTR(Name,'av')As Result from student where INSTR(Name,'av') > 0; +--------+--------+ | name | Result | +--------+--------+ | Gaurav | 5 | | Aarav | 4 | | Gaurav | 5 | +--------+--------+ 3 rows in set (0.00 sec) mysql> select name, INSTR(Name,'av')As Result from student where INSTR(Name,'av') = 0 ; +---------+--------+ | name | Result | +---------+--------+ | Harshit | 0 | | Yashraj | 0 | +---------+--------+ 2 rows in set (0.01 sec)
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment