SQL is a non-procedural language. Client can compose SQL script to execute and SQL compiler consequently produces a method to get to database and convey the fancied output. SQL is a database coding, planned for the recuperation and organisation of data in social database. A record in the SQL Database table is said to be clone. And a SQL Clone can be described as copying the records in the database or replicating the record from the database.
By viewing the below example the concept of Clone can be easily understood.
Conceptual figure
Agent - Which is used to act as an interface between user and the server.
Clone - Copy of record in the database.
Database - Is a collection of logical related data.
SQL Clone Example
Step - 1
Identify the table records for cloning.
[c]
sql> select * from settings where hostname="php";
+-------------+------+----------+
| value | data | hostname |
+-------------+------+----------+
| AC3PassThru | 0 | php |
+-------------+------+----------+
1 row in set (0.00 sec)
[/c]
Step - 2
Cloning the above table record "php".
[c]sql> insert into settings select * from settings where hostname="php";
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
sql> select * from settings where hostname="php";
+-------------+------+----------+
| value | data | hostname |
+-------------+------+----------+
| AC3PassThru | 0 | php |
| AC3PassThru | 0 | php |
+-------------+------+----------+
2 rows in set (0.00 sec)[/c]
Here in the above example, the host name and all other values are repeated by performing the clone operation.
Summary
Key Points
SQL Clone - Copying or replicating a record in the database is said to be clone.