UrbanPro
true

Learn SQL Programming from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

SQL Tips (4 to 6)

Umasankar Natarajan
07/07/2017 0 0

SQL tips 4:
Avoid INDEX, unless you need to retrieve information quickly. Index will slower insert and update data query.

The another way is using sub query

Select MAX(salary)
FROM employee
WHERE salary IN
(Select top 2 salary from employee where salary is not null order by salary desc)

==============================================
SQL tips 5:
NULL and ZLS (zero length string) both are different.

NULL means data is unknown or missing.

NULL should be checked with IS NULL or IS NOT NULL only. Comparison operator equal to (=) or not equal to (<>) should not be used.

ZLS should be checked with two single quotes  ('') together.                        

==============================================
SQL tips 6:
Always use primary key with integer field and unique key with string or text field.

This is not rule, it is best practice.

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Difference between Find and Search Function in excel
In excel there are two functions which are taking same arguments and return type. SEARCH() --> Search a text within text, Case insensitive Example: Search("t","Management Team") and Search("T","Management...

Database Normalization
Database Normalization is the process of reducing duplication in database by decomposing the table1. Normal Form (1NF): Every attribute is atomic, Each cell to be single valued No multivalued attribute:...

Create Project Schedule with MS project
Step 1 : Understand the project requirements Step 2 : Seggregate the functional and non-functional requriements Step 3 : Priortise the requirements based on the customer needs and dependencies Step...

SQL Union Vs Union ALL
SQL UNION vs UNION ALL Operator Usage UNION: UNION combines the result set of two or more queries into a single result set. UNION removes duplicate records (where all columns in the results are the same). UNION...

Set 0 To Kth Bit In A Variable
The following code snippet Set 0 to Kth Bit in an variable #include int UnsetBitValue(int n, int k);int main(){ printf("%d\n\n",UnsetBitValue(255,6)); return 0;}// Set kth bit to zeroint UnsetBitValue(int...
X

Looking for SQL Programming Classes?

The best tutors for SQL Programming Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn SQL Programming with the Best Tutors

The best Tutors for SQL Programming Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more