MySQL UNION Operator
Using MySQL UNION Operator you can combine two or more result set from a multiple table into a single result set. UNION operator eliminates duplicate rows from the result set even you forgot to use […]
Using MySQL UNION Operator you can combine two or more result set from a multiple table into a single result set. UNION operator eliminates duplicate rows from the result set even you forgot to use […]
Using MySQL LIKE operator you can search based on patterns. It is used in the WHERE clause in SELECT statement. This basically use two characters for using the MySQL LIKE operator: ‘%’ – allows you […]
To specify a range of test you can use BETWEEN operator. Example of BETWEEN: SELECT * FROM users WHERE age BETWEEN 18 AND 55; Here below 18 and above 55 aged user will be eliminated. […]
Using IN operator in MySQL you can match the value from a set of values or a subquery. Example of MySQL IN: SELECT * FROM user WHERE country IN (‘IN’,’AUS’); Here both the user from […]
In a table there may be data available i.e. duplicate. Each time you querying and get all the duplicate data. Use DISTINCT to avoid it. Suppose in a coountry table there are two same country […]
To sort a table columns in ascending or descending order you use ORDER BY clause. Using ASC and DESC you can get the result in ascending or descending order. You can also apply both order […]
In SELECT statement you can filter with condition to get actual result. Using WHERE clause you will get the data from the table that you exactly need. Here is sample sql for Filter Rows: SELECT […]
Using MySQL SELECT statement you can fetch combination of columns and rows from tables or views, known as a result set. This is the one of the most commonly used queries in MySQL to get […]
To store a temporary result set you can use a special type of table i.e. called MySQL temporary table. To keep temporary data, the temporary tables could be very useful in some cases. When the […]
To change the structure of a table you use ALTER TABLE statement. This allows you to add or drop column, change data type, rename table etc. Example of ALTER TABLE: ALTER TABLE table_name CHANGE COLUMN […]