- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6702 Articles for Database
![Kiran Kumar Panigrahi](https://www.tutorialspoint.com/assets/profiles/390736/profile/60_2598-1635242143.png)
6K+ Views
On almost every machine, the localhost and 127.0.0.1 are functionally the same. But, they are not exactly the same. This article is meant for explain the important differences between localhost and 127.0.01. What is Localhost? "localhost" is the machine name or IP address of the host server. You can think of it as the domain name for "127.0.0.1". The localhost allows a network connection to loop back on itself. It is a communication port that is connected to the local server. It helps us in spoofing the network connections when such a network does not exist. We tend to use ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
1K+ Views
Stored Procedure In MySQL, a stored procedure can be called with the help of call statement. A stored procedure returns more than one value. A stored procedure returns 0 by default. It cannot be used in SQL query and is based on precompile. Function A function can be called inside the statement. It can return a value with the help of return statement and it returns only one value. A function returns any single value, which can be a table. It can be used in SQL query and isn’t based on precompile.
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
9K+ Views
We can update another table with the help of inner join. Let us create two tables. Creating a table mysql> CREATE table tblFirst -> ( -> id int, -> name varchar(100) -> ); Query OK, 0 rows affected (0.48 sec) Inserting records mysql> INSERT into tblFirst values(1, 'John'); Query OK, 1 row affected (0.17 sec) mysql> INSERT into tblFirst values(2, 'Bob'); Query OK, 1 row affected (0.26 sec) mysql> INSERT into tblFirst values(3, 'David'); Query OK, 1 row affected (0.20 sec) Displaying ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
2K+ Views
Row_NUMBER() included from MySQL version 8.0. It is a type of window function. This can be used to assign a sequence number for rows. To understand, create a table with the help of CREATE pcommand −Creating a tablemysql> CREATE table rowNumberDemo -> ( -> FirstName varchar(100) -> ); Query OK, 0 rows affected (0.92 sec)Inserting recordsmysql> INSERT into rowNumberDemo values('john'); Query OK, 1 row affected (0.17 sec) mysql> INSERT into rowNumberDemo values('john'); Query OK, 1 row affected (0.29 sec) mysql> INSERT into rowNumberDemo values('Bob'); Query OK, 1 row affected (0.13 sec) mysql> INSERT into rowNumberDemo values('Smith'); Query ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
912 Views
To copy data from one table to another table, firstly we will create a table.Creating first table −mysql> CREATE table FirstTable -> ( -> id int, -> name varchar(100) -> ); Query OK, 0 rows affected (0.61 sec)After creating a table, we will insert records.mysql> INSERT into FirstTable values(1, 'john'); Query OK, 1 row affected (0.20 sec) mysql> INSERT into FirstTable values(2, 'Smith'); Query OK, 1 row affected (0.21 sec)We can display all the records with the help of SELECT statement −mysql> SELECT * From FirstTable; The following is the output+------+-------+ | id | name | ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
6K+ Views
Firstly, we need to create a table with some records, then we will use pagination with the help of limit and offset.Creating a table with the help of CREATE command. The query is as follows −mysql> CREATE table limitoffsetDemo -> ( -> id int, -> FisrtName varchar(200) -> ); Query OK, 0 rows affected (0.45 sec)After creating a table, we will insert records with the help of INSERT command.Inserting recordsmysql> INSERT into limitoffsetDemo values(1, 'John'); Query OK, 1 row affected (0.11 sec) mysql> INSERT into limitoffsetDemo values(2, 'Bob'); Query OK, 1 row affected (0.16 sec) mysql> INSERT into ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
3K+ Views
MySQLi is also known as MySQL improved Extension. It is a relational SQL database management system. It is often used inside PHP to provide an interface with the MySQL databases. Some of the reasons why MySQLi is famous are given below − MySQLi uses the standard form of the SQL language. MySQLi is free as it is released under an open source license. MySQLi can be easily used with PHP which is the most famous language for web development. MySQLi is a very powerful language and it can handle the functionality of powerful database packages. MySQLi can work with ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
300 Views
The text can be found and replaced with the help of the replace() function. It is explained with the help of the following steps −First, a table is created with the help of the create command which is given as follows −mysql> CREATE table FindAndReplaceDemo -> ( -> FirstName varchar(200) -> ); Query OK, 0 rows affected (0.43 sec)After creating the above table, the records are inserted with the help of the insert command. This is given below −mysql> INSERT into FindAndReplaceDemo values('john'); Query OK, 1 row affected (0.15 sec) mysql> INSERT into FindAndReplaceDemo values('smith'); Query OK, 1 row ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
96 Views
We can display all the tables with the help of the WHERE clause. The syntax for that is as follows −SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB';Now, the above syntax is applied to the given query −mysql> SELECT * from INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB';The following is the output obtained −+---------------+--------------+---------------------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+---------------------------------------+-----------------------------------------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | ENGINE | VERSION | ROW_FORMAT | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | MAX_DATA_LENGTH | INDEX_LENGTH | DATA_FREE | AUTO_INCREMENT | CREATE_TIME | UPDATE_TIME | CHECK_TIME | TABLE_COLLATION | CHECKSUM | CREATE_OPTIONS | TABLE_COMMENT | +---------------+--------------+---------------------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+---------------------------------------+-----------------------------------------+ | def | mysql ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
848 Views
To remove leading and trailing space, we can use the trim() in MySQL. Firstly, we will create a table with the help of CREATE command.Creating a table −mysql> CREATE table TrailingANdLeadingDemo -> ( -> SpaceTrailLead varchar(100) -> ); Query OK, 0 rows affected (0.57 sec)After creating a table, we will insert a record with the help of INSERT command. Let us insert a record with leading and trailing space −mysql> INSERT into TrailingANdLeadingDemo values(' john '); Query OK, 1 row affected (0.12 sec)We can display all the records with the help of SELECT commandDisplaying recordsmysql> SELECT * from TrailingANdLeadingDemo; The ... Read More