Enable contrast version

Tutor profile: Kalai D.

Inactive
Kalai D.
Computer Professional with 8 years of experience
Tutor Satisfaction Guarantee

Questions

Subject: SQL Programming

TutorMe
Question:

Correct usage of WHERE and HAVING clause also explain GROUP BY

Inactive
Kalai D.
Answer:

Both WHERE and HAVING clauses are used for restricting the values based on a specific condition. WHERE is generally used with conditions involving single row functions. Ex. where salary<100000 or round(comm)>500 HAVING is used with conditions involving multiple row functions. Ex. HAVING max(salary)<100000 GROUP BY clause is used along with any aggregate functions. Ex. Select max(salary) from emp group by designation - Here it lists out max salary of each designation Note:- GROUP BY cannot appear without aggregate function (at least one) But it is not mandatory to have GROUP BY clause when the query contains Group functions (i.e aggregate functions) It appears in the order WGH - where , group by , having ( may be student can remember with their own example like Where is Girls' Hostel or Where is Government Hospital

Subject: Information Technology

TutorMe
Question:

Steps to connect JDBC driver with Database:-

Inactive
Kalai D.
Answer:

JDBC - Java Database Connectivity is developed by Sun Java (which is now acquired by Oracle) for connecting Java App with different Back ends like MySQl, Oracle and so on. 1. Import the necessary packages import java.sql.* (* indicates Connection, DriverManager, Statement and ResultSet here) 2. Register the JDBC driver with Driver Manager Class.forName("java.sql.Driver") 3.Set up a connection Connection con = DriverManager.getConnection(path along with local host, username, password); path can be "jdbc:mysql://localhost:3306/Databasename" 4. Create a statement Statement stmt = con.CreateStatement() 5.Execute a query Select - ResultSet rs = stmt.executeQuery( "select query") update,delete and insert - int i = stmt.executeUpdate("sql statement")

Subject: Databases

TutorMe
Question:

Difference between Count(ColumnName) and Count(*) function with respect to NULL Values

Inactive
Kalai D.
Answer:

Actually Count is a Aggregate function and all the aggregate function generally omits NULL value and process on the remaining records. Count(ColumnName) also works in similar way by avoiding NULL values. But Count(*) includes NULL values as * which just indicates a mere selection of any values. Let us see with an example. Assume ID column as Non- Primary Key Emp - Table ID Name 1 X 2 Y 3 NULL NULL NULL Now Count(Name) will result in 2 Count(ID) will result in 3 and Count(*) will result in 4

Contact tutor

Send a message explaining your
needs and KALAI will reply soon.
Contact KALAI

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.
BEST IN CLASS SINCE 2015
TutorMe homepage
Made in California by Zovio
© 2020 TutorMe, LLC
High Contrast Mode
On
Off