MySQL Tutorials
SQL/PL-SQL

MySQL Insert Into Statement

MySQL INSERT INTO statement is used to insert records in the table. This statement comes under Data Manipulation Language. There are many ways to use INSERT INTO statement in MySQL. So let’s understand these ways Let’s assume we have a table structure of Employee Table   Now let’s understand INSERT INTO syntax and how can we use […]

Easy Solution Web : MySQL Tutorials
SQL/PL-SQL

MySQL IF() function

IF() function is one of the most interesting functions in MySQL as it helps a lot while implementing a complex logic in a simple query. IF FUNCTION takes three parameter IF(CONDITION STATEMENT, STATEMENT FOR TRUE CASE, STATEMENT FOR FALSE CASE) We use IF function mostly to generate calculated column which is used to show the […]

MySQL Tutorials
SQL/PL-SQL

Resolve error 150 while restoring backup in MySQL Database

If you are getting error while importing or restoring the database dump like as mentioned below : MySQL: Can’t create table ‘./dbname/data.frm’ (errno: 150) This may come due to foreign key constraints defined in tables.  So If in backup file Referencing table is created before the Referenced table than this will throw error. So, in […]

Easy Solution Web : MySQL Tutorials
SQL/PL-SQL

Problems on LIMIT and their solution in MySQL

We have a table structure with table name EMP as showing in below image         These are the three Most important and Most Asked Questions in an interview if you are preparing for Interview these concepts will be helpful to you. In which many failed to answer these Questions even the experienced one. […]

MySQL Tutorials
PHP SQL/PL-SQL

SQL Injection

SQL injection is a most common area which a hacker can exploit and which proves to be disastrous for your website. So as a professional developer you must avoid code which is prone to SQL injection in any way. Example of SQL Injection User will input: 105 or 1=1 your query will become: SELECT UserId, Name, Password FROM Users WHERE UserId = 105 or 1=1; This will […]

Easy Solution Web : MySQL Tutorials
SQL/PL-SQL

Concepts of insert and limit in MySQL

Here we will discuss some useful concepts on insert statement and limits, which will be proved to be a boon to your development career if you don’t know these yet. Let’s name them first On duplicate update or insert update. Insert into select. Insert Ignore. Use of Limit. On duplicate update If you want to insert in […]

Easy Solution Web : MySQL Tutorials
SQL/PL-SQL

unix_timestamp(), from_unixtime(), date_add(), date_sub() and interval concept in MySQL

Epoch time, Unixtime, Unix timestamp, all these are same. It is basically no. of seconds passed from 1 january 1970 00 hrs 00 min 00 sec which might cause problems on January 19, 2038. This is short description about Epoch time.   Epoch time for a date having 0 hrs 0 min 0 sec in MySQL […]

Easy Solution Web : MySQL Tutorials
SQL/PL-SQL

What is utf8mb4 in MySQL?

MySql support two varities of utf-8 character and collation set are utf8mb3(only contains BMP characteres) and utf8mb4(utf-8 characters and supports supplementary characters) In mysql 4.1 there is latin1 as a default character set and utf8mb3 is available as an option. But an optimization was chosen to limit utf-8 to 3bytes which support all modern languages. […]