Question:- How To Display Nth Highest Salary From A Table In A MySQL Query?
Answer:- Query: SELECT DISTINCT(salary)FROM employee ORDER BY salary DESC LIMIT n-1,1 So if you want to find out the 2nd highest salary, consider the below query. SELECT DISTINCT(salary) FROM employee ORDER BY salary DESC LIMIT 1,1
Question:- What Is SQL Query To Find The Maximum Salary Of Each Department?
Answer:- SELECT dept_id, MAX(salary) FROM employee GROUP BY dept_id;
Question:- How Do You Find All Employees With Their Managers?(Consider There Is A Manager Id Also In Employee Table)
Answer:- SELECT m.emp_name as Employee, e.emp_name as Manager FROM employee e, employee m WHERE m.manager_id =e.id;
Question:- How To Find The Count Of Duplicate Rows?
Answer:- SELECT id, COUNT(id) from employee Group by id Having COUNT(id)>1 Order by COUNT (id) desc;
Question:- How To Remove Duplicate Rows From The Table?
Answer:- DELETE e FROM employee e INNER JOIN employee e2 WHERE e.id < e2.id AND e.emp_name = e2.emp_name AND e.dept_id = e2.dept_id;
Question:- In Which Language Is MySQL Written?
Answer:- MySQL is written in C and C++ programming and SQL parser written in yacc.
Question:- How Do You Start MySQL On Linux?
Answer:- /etc/init.d/mysql start command is used to start MySQL on Linux.
Question:- Explain The Difference Between MySQL And MySQL Interfaces In PHP.
Answer:- • Mysqli is the object-oriented version of mysql library functions used in PHP. • Mysql_connect() • Mysqli_connect()
Question:- What Does The Tee Command Do In MySQL?
Answer:- Tee followed by a filename turns on MySQL logging to a specified file. It can be stopped by a command note.
Question:- How Do You Change The Password For An Existing User In MySQLAdmin?
Answer:- Mysqladmin -u root -p password “newpassword”
Question:- How To Use Mysqldump To Create A Copy Of A Database?
Answer:- Mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql
Question:- What Does Mysqlcheck Do ?
Answer:- Mysqlcheck is a client program that checks the integrity of database tables.
Question:- What Mysql -U John -P Command Does?
Answer:- • Mysql -u john -p command will prompt for the password for user john before allowing access to the database management system. • If your database server requires a username and password to gain access the -u and -p command-line options.
Question:- What Are The Technical Features Of MySQL?
Answer:- MySQL database software is a client or server system which includes : • Multi Threaded SQL server supporting various client programs and libraries. • Different backend • Wide range of application programming interfaces • Administrative tools
