Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to Make MyFriends Query in MySQL?

Hello readers! If you are developing the web based friendship structure, Then in this blog we will help you to make myfriends query with database. Let's suppose you have database in following structure ID senderM...

Discussion on insert data using replace statement in Mysql

Hi Reader's, Welcome to FindNerd, today we are going to discuss insert data using replace statement in Mysql Basically REPLACE INTO Statement is used for inserting a row in a table. If we want to replaces any record form our table then fi...

How to use LIKE operator in MySQL

Hi Reader's, Welcome to FindNerd, today we are going to discuss how to use  LIKE operator in MySQL? Basically, LIKE operator is used for searching for a specified pattern in a column. So in other words we can say that the LIKE operat...

What is process to use Limit clause in MySQL Query ?

Welcome to FindNerd, today we are going to discuss what is process to use Limit clause in MySQL Query.? Basically the LIMIT clause  is used to specify the number of records to return. In the MySQL LIMIT clause is used to limit the numb...

What are Mysql Indexes

A database index is a structure that improves the speed of retrieval of data from our table. Index is similar to the index of a book. If you want to find a chapter you look in the index first without scanning the whole page. Users cannot see th...

Use of IN operator and BETWEEN operator in MySQL

MySQl IN operator facilitates us to match a column's value against multiple values in one go.   As most of us are aware that we use WHERE clause for giving any condition in SELECT, INSERT, UPDATE, DELETE statements, so whenever we ...

How to get a list of MySQL user accounts

Get MySQL user accounts   Hello friends, I am using MySQL and I want to list user accounts. So to do this I followed the below process:   This can be done by writing the following query: SELECT User FROM mysql.user; ...

What is the use of IFNULL Operator in MySQL?

In MySQL, the IFNULL operator is used as conditional statement for NULL values. When we need to fetch NULL values with LIKE operator then we can use this operator. Example: We have a table "employee" as below:    ...

How to make WHERE col LIKE '%' select NULL values too?

When we apply LIKE keyword to any query then it doesn't return NULL values, and sometimes it required to return NULL values as well. We can do this by using IS NULL or IFNULL operator. Example: We have a table "employee" as be...

INTERSECT Clause

INTERSECT Clause: It works similar like union clause as it is used to combine two SELECT statements, but it returns  tuples only from first SELECT statement which are common to tuples in the second SELECT statement. Syntax: S...

How to update multiple row in single mysql query

Hello friends, Most of time we need to update multiple row at a time or in single mysql query, So most of developer use iterate the update query and execute many time. This is not good practice. We should use syntax given as below. For Exam...

How to use the mysql result for the sepecific values

Hello Reader's if you are learning, optimizing the mysql query then in this blog you will know some new syntax offered by Mysql where you can make your query fast. Lets see the examples as below:- In the code below, the results select...

Mysql: Compare two columns word and print total common words count

I am posting this blog because I was facing issue to show the total common counts in 3rd column from two columns. This is following table which contain these records: |==========title=================|======title================| |...Cat Do...

SQL: How to display all the records related to common id

I was stuck in the following issue. Issue was related with retrieving common records in group. I have to display records which are common with each id. Following records are inserted into the table "mytable": id | ti...

How to use IN Command with Multiple JOIN

IN Command: In MYSQL, IN command is basically means handing multiple values in the WHERE Clause. The following command show how we can use it. This Command make use of three table named actor, casting and movie. The Following query tries to ge...

How to sort column by clicking on column header iin PHP

Below code will gives us a table on which when we  first time click the headers of column, it display data in ascending order.  if we click the header second time than it display values in descending  order.   <?php...

How to fetch data from database in PHP

For fetching data from database  in php, first we have to create a connection from database by using following code.   <?php $servername = "localhost"; $username = "root"; $password = "pass"; $database = "demo"; //this wi...

Insert data into database from form in PHP

Below is a form which contain id field, name field, phone number filed, gender radio button and we are sending these data  by using post method. <form name="user_registration" method="post" > Name: <input type="text" name...

Temporary tables

MySQL Temporary tables: A temporary table allows a user to store temporary records and we can use these records several times until the session does not expire. They are useful in those situations when it is expensive to write a query havin...

What is process to Copy entire date into other table in SQL Database ?

Hi Reader's, Welcome to FindNerd, today we are going to discuss what is process to Copy entire date into other table in SQL Database ? If you want to copy a SQL table into another table in the same SQL database then you should use copy st...

Use of AVG() Function in MySql

The MySql provides us with various for wide use for handling the database. The AVG() function is also one of the important function used in MySql. The AVG() is used to calculate the average value of the columns. Syntax: SELECT AVG(column-n...

TOP Clause in SQL

SELECT TOP clause: TOP clause is used to fetch specific number of records from a table. This clause is very handy when we have huge table of thousands of record in it . And fetching data from these tables are quite time-consuming , in ...

How to use Right Join on two tables

Right Join: Right Join is used to join two tables and it return all rows from right table(table 2) and matching rows from table 1(left table). The result is NULL for unmatched rows for table 1(left table). Right Join keyword is used to apply R...

Aggregate Functions

Aggregate Functions: Oracle has many built-in functions which are used to process numbers or strings. They are very useful as we can directly use them , we just have to write the aggregate function name and in braces the column name on which w...

Having Clause

Having Clause: The Having clause is used to filter the group result. As we cannot use Where to filter the Group By clause results so Having provide the same functionality as Where. It filter the result fetched by Group By clause. It comes a...

Rolling Back A Transaction in MySql

Transactions are very important part of MySql and for handling the transactions the Transaction Control Language (TCL) is used. Transactions are basically used to handle all the changes made in the database. Rolling back a transaction means stor...

Crreating Virtual Table using CREATE VIEW statement

CREATING VIEWS: Views are virtual tables which are created from other tables .It is beneficial for those situation when we want to show limited columns to users. It can be created from one or more tables. Syntax: CREATE VIEW viewname AS ...

How change date format using MySql

Hello Reader's if you are using unix timestamp for storing date the time. Then you have to convert them into date format. But now MySql has come with a new syntax of 'format', Because of this it will make the conversion as you want and will save...

How to use top in Mysql

Hello Reader's if you want to use top in your MySql query then this blog is very helfull to you. Lets see how to use top clause in MySql in different different location. Suppose if you want to get only first 5 records of the table, Then you c...

What is the use of DISTINCT statement in MySQL.

In MySQL, the SELECT DISTINCT statement is used to return only distinct values means if in a table, a column has duplicate values then SELECT DISTINCT statement will be used to get different values. SELECT DISTINCT Syntax SELECT DISTINCT co...

SQL Tutorial -> Sql Joins

<-- Chapter 24: SQL Aliases Chapter 25 SQL Joins SQL Joins clause are used to combine data rows from two or more than two tables according to common field values between them. Lets see an examples from the below tables "customer...

Inserting data using replace statement

REPLACE INTO Statement: It is used to insert a row in a table.It is similar to INSERT INTO statement but it does not allow duplicate row as it replaces the old one with the new one. Syntax: REPLACE INTO tablename (column1, column2, col...

SQL Tutorial -> SQL Aliases

<-- Chapter 23: SQL Wildcards Chapter 24 SQL Aliases SQL Aliases are used to rename a particular table name or column name in a temporary manner. In a SQL statement , any table or column name can be temporary change. SQL Syntax fo...

SQL Tutorial -> Sql Select Top

<-- Chapter 21: SQL Injection Chapter 22 SQL Select Top SQL Select Top clause is used to retrieve TOP N number of Records or X percent of Records from database table. Note: All database systems does not support the SELECT TOP claus...

ALIAS Keyword

ALIAS Keyword: It is used to give temporary names to table and columns. It is very useful for situations where column or table names are too long. Synatx: SELECT columnname AS alias&#95;name FROM tablename; This syntax is used ...

How to hit MySql queries by using Angular JS

Hello Readers If you want to hit the MySql queries from another page by your current page, The by using Angular js you can do this. Also angular js will offers you to show your records in a pre formated desing. Let's see the example as below:- ...

SQL Tutorial -> Sql Delete

<-- Chapter 19: SQL UPDATE Chapter 20 SQL DELETE DELETE statement is used to delete a particular data Rows from Database Table with the help of WHERE clause. Without WHERE clause all rows will be deleted. Lets see an example from th...

SQL Tutorial > Sql And & Or

<-- Chapter 15: SQL <= Operator Chapter 16 SQL And & Or AND/OR Operators are used in SQL statements to filter the Records based on more than one condition. AND Operator display the records in which all the specified conditions a...

SQL Tutorial -> Sql > Operator

<-- Chapter 11: SQL BETWEEN Operator Chapter 12 SQL > Operator Lets see an example from the below table "employees" :- employee_id name code designation salary 101 ABC E-101 Engineer 12000 102 DEF E-...

SQL Tutorial -> Sql != Operator

<-- Chapter 8: SQL = Operator Chapter 9 SQL != Operator Lets see an example from the below table "employees" :- employee_id name code designation salary 101 ABC E-101 Engineer 12000 102 DEF E-102 Docto...

How to pass mulitple values to update records with a single query

Hello Readers if you want to update mulitple record by multiple id, then you have to use in clause in MySql Lets see the example as below:- $ids = array(474,25, 99,101); Here I have an array $ids with multiple id's. Now this array w...

SQL Tutorial -> Sql = Operator

<-- Chapter 7: SQL NOT IN Operator Chapter 8 SQL = Operator Lets see an example from the below table "employees" :- employee_id name code designation salary 101 ABC E-101 Engineer 12000 102 DEF E-102 D...

SQL Tutorial -> Sql NOT IN Operator

<-- Chapter 6: SQL IN Operator Chapter 7 SQL NOT IN Operator Lets see an example from the below table "employees" :- employee_id name code designation salary 101 ABC E-101 Engineer 12000 102 DEF E-102 ...

SQL Tutorial -> Sql IN Operator

<-- Chapter 5: SQL Where Chapter 6 SQL IN Operator Lets see an example from the below table "employees" :- employee_id name code designation salary 101 ABC E-101 Engineer 12000 102 DEF E-102 Doctor 80...

SQL Tutorial -> Sql Where

<-- Chapter 4: SQL Distinct Chapter 5 SQL Where SQL Where : SQL Where clause extract or filters those records which matches the specified condition. Syntax for Where clause is used below SELECT * FROM tablename WHERE condition ...

SQL Tutorial -> Sql Distinct

<-- Chapter 3: SQL Select Chapter 4 SQL District SQL District : District is a keyword which is used to fetch unique column values from database table OR we can simply say that ignores the column duplicate values. Syntax for district ke...

SQL Tutorial -> Sql Select

<-- Chapter 2: SQL Syntax Chapter 3 SQL Select SQL Select : SELECT command describes that through which we can fetch data from MYSQL database tables OR we can say, It is used to retrieve/select data from MYSQL database. SELECT comma...

SQL Tutorial ->Introduction to SQL

Chapter 1 Introduction to SQL Introduction to SQL : SQL stands for Structured Query Language or we can call it as "sequel" or "S-Q-L" . SQL is a query Language used to accessing and modifying information in a database.There are some common ...

SQL Tutorial -> Sql Syntax

<-- Chapter 1 Introduction to SQL Chapter 2 SQL Syntax SQL Syntax : SQL syntax is basically followed by sql commands which modifies the database tables such as "users" , "students" etc. All the SQL statements always starts with the key...

Handling Duplicates using INSERT IGNORE

INSERT IGNORE: INSERT IGNORE is used for handling duplicacy in a table as it ignores the query if the data is already present in the table and if the data does not exist then new row will be inserted. Syntax: INSERT IGNORE INTO tablename...
prev 1
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: