Home / mySQL (page 5)

mySQL

AND and OR Operators – SQL

Hi Guys, Today we share our idea related to AND and OR operator with example. The AND and OR operators are the conditional operator in SQL. It is used to filter the data or records based on conditions. The main difference between AND and OR operators are: the AND operator …

Read More »

MYSQL Functions

Hi all, Welcome to MYSQL functions tutorial. MYSQL functions are useful while performing mathematical calculations, string concatenations, sub-strings etc. SQL provides many built in functions to performe these functionality or performing calculations on data. The most commonly used MySQL functions including: Aggregate functions String functions Date time functions control flow …

Read More »

Set Operation in SQL- UNION, UNION ALL, INTERSECT,MINUS operator

Hi Guys, Welcome to sql set operations. SQL support some set of operations to be performed on MYSQL tadabase table. These are used for getting meaningful results from table, based on different conditions. Union MySQL UNION operator to combine two or more SELECT statements into a single result set. UNION …

Read More »

Retrieve the unique rows without using the DISTINCT keyword

Good Morning to all, We know the uses of DISTINCT keyword in SQL. Here I share some usesful information relates to “Retrieve the unique rows without using the DISTINCT keyword.” The DISTINCT keyword is used to return only distinct or different values. In table, the column may contain many duplicate …

Read More »

SUM the table row values from mysql database – PHP

Here I’m going to discuss about, how to add the table row values using php and mysql. This concept is very simple, we can fetch the data from database add/sum the column values. The values are inserted into database and fetch the values from database, and find the sum values …

Read More »

Difference between having clause and group by statement

GROUP BY The group by clause is used for grouping the records of the database table according to our need. Which is an optional part of SELECT statement. SYNTAX SELECT column1, column2 FROM table_name WHERE [ conditions ] GROUP BY column1, column2 ORDER BY column1, column2 The GROUP BY clause …

Read More »

Get highest or second highest or lowest values from table – MYSQL

Hi Guys, Today I share some useful topic related to MYSQL. The MYSQL is very helpful in our project or queries for different functionality. The MYSQL is most popular Open source management system. Suppose that, you are given the following simple database table called EmployeeDetails table that has two field …

Read More »

Alter a column to be AUTO_INCREMENT – Mysql

Hi friends, Today, I’m trying to modify a table to make it’s primary key column AUTO_INCREMENT after the fact. Here I going to demonstrate how to reset auto-increment value in MYSQL. The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows. First create the table with …

Read More »

SQL- Syntax

All the SQL statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE, ALTER, DROP, CREATE, USE, SHOW. And all the statements end with a semicolon (;). SQL is case insensitive, which means INSERT and insert have same meaning in SQL statements. But MySQL makes difference in table …

Read More »