set @b:=0;set @b1:=3; ##select distinct salary,@b:=@b+1 as Row_no from empselect * from emp where salary=(select salary from (select a.salary,@b:=@b+1 as row_no from (select distinct salary from emp) a) bwhere b.row_no=@b1) b).How to find the duplicate value in mysql select...
Friday, January 1, 2021
Exists :Table2 id exists in table1 so it will fetch data from table1 select * from table1 a where exists (select distinct b.Emp_id from table2 b where a.emp_id=b.Emp_id ) ; Not exists : emp_id is not exists from table1 i will return only not exists in table2 select * from table1 a where...
Q. How to recover forget root password ?if you forget root mysql password so If you want to recover mysql password & reset new password .Step 1 : STOP mysql service #systemctl stop mysqldStep 2: #mysqld_safe --skip-grant-tables & Step 3: Login in mysql#mysql -uroot ...
undefined
202
Index : 1. Available metadata access
methods (2). Structures of information_
schema (3). Using available commands to view
metadata (4).Differences between SHOW
statements and INFORMATION_SCHEMA tables (5).The MYSQL show client program (6).Using INFORMATION_SCHEMA queries to create shell commands
and SQL statements
p...
undefined
202
We are taking backup only function & store procedure from mysql database.[root@VMs]#
mysqldump -u db_user -p -h 192.168.101.51 --routines
--column_statistics=0 --no-create-info --no-data --no-create-db
--skip-opt mydb > mydb_live_proc_funaction....
Table is not found in Database. How to skip table is not exist in database.mysqldump
-u db_user -p -h 192.168.xx.xx --routines --column_statistics=0
--no-create-info --no-data --no-create-db --skip-opt --ignore-table=test.audit --ignore-table=test.audit_old test
--ignore-table=test.blog...
undefined
202
I have one table Student .So i want to fetch data according to percentage and give remark according to position .set @no=0 ;select @no:=@no+1 as S_No,name,percentage, CASE WHEN percentage >= 90 Then 'excellent' WHEN percentage >=60 then 'first' WHEN percentage...
-
Step1 : Firstly you have to take backup current table . create table tb_old like tb_new insert into tb_new select * from tb_old ...
-
We are taking backup only function & store procedure from mysql database. [root@VMs]# mysqldump -u db_user -p -h 192.168.101.51 --ro...
-
Index : 1. Available metadata access methods (2). Structures of information_ schema (3) . Using available commands to view metadata (...
How to Find the Third highest salary in mysql
set @b:=0; set @b1:=3; # #select distinct salary,@b:=@b+1 as Row_no from emp select * from emp where salary=( select salary from ( sele...
