To understand this problem lets consider a table emp shown below emp_id emp_name emp_salary 1 Maria Anders 20000 2 Francisco Chang 30000 3 Roland Mendel 25000 4 Helen Bennett 25000 5 Yoshi Tannamuri 35000 Query 1: Select * from emp This query would fetch all... Read More..
Suppose there is a product table below has p_id,p_name and p_image column and i want replace .png extention by .jpg in p_image column. p_id p_name p_image 1 product1 product1.jpg 2 product2 product2.png 3 product3 product3.jpg 3 product4 product4.png Query: update product set p_image = REPLACE(p_image,’.png’,’.jpg’)... Read More..
To concat Mr. string in each row of a column lets consider a below table employee has column e_id,e_name,e_salary I want to add Mr. prefix in each row of e_name column. e_id e_name e_salary 1 A 20000 2 B 25000 3 C 30000 Query: update... Read More..
The difference between method overloading and overriding in java is one of the most commonly asked interview question.Most of the people gets confused while answering to this question.Here is the list of differences 1.For overloading method signature must be different, but overriding must have same... Read More..
To find find difference between two successive salaries we will need salary in previous or next row. So to get value of previous or next row we can use LAG() or LEAD() functions respectively. Employee table shown below: EId Salary Year 1 2000 2001 1... Read More..
To find sum of maximum salaries in each department we make use of group by, max() and sum() function. Employee Table shown below: Ename Eno Esalary Dno A 1 100 10 B 2 400 10 C 3 200 10 D 4 300 20 E 5... Read More..
To add columns dynamically in output,we can use CASE….WHEN which is similar to IF…THEN in programming. Transaction table: TID Amount 1 -100 2 -200 3 100 4 300 5 400 6 -500 SELECT tid, (CASE WHEN AMOUNT > 0 THEN 'Credit' WHEN AMOUNT < 0... Read More..
The include() and forward() are the only two methods of the javax.servlet.RequestDispatcher interface.Both methods used to dispatch the reqest from a client to the server but the scenarios we need them are different. Similarities between include() and forward() methods: 1. Both are methods of RequestDispatcher... Read More..
There are two ways we can install android by using SDK with eclipse and Android Studio Before installation of any process. you need to install the java on your system and path setting. 1.Install the java from below link in your system. http://www.oracle.com/technetwork/java/javase/downloads/index.html 2.Setting path... Read More..
After getting a about what is android and history its time for how we use the android what are the hardware & software Requirment for android. Software Requirement: Microsoft Windows XP or later version. Mac OS X 10.5.8 or later version with Intel chip. Linux... Read More..