This article may be too technical for most readers to understand. Please help improve it to make it understandable to non-experts, without removing the technical details. (June 2016) (Learn how and when to remove this template message)
This article does not cite any sources. (March 2007) (Learn how and when to remove this template message)
A database dump (also: SQL dump) contains a record of the table structure and/or the data from a database and is usually in the form of a list of SQL statements. A database dump is most often used for backing up a database so that its contents can be restored in the event of data loss. Corrupted databases can often be recovered by analysis of the dump. Database dumps are often published by free software and free content projects, to allow reuse or forking of the database.
-- Database CREATE DATABASE `example`; USE `example`; -- Table structure for table `users` CREATE TABLE `users` ( `id` int(8) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(16) NOT NULL, `password` varchar(16) NOT NULL, PRIMARY KEY (`id`) ); -- For auto increment when the new record added to the table -- CREATE TABLE `users` ( `id` serial NOT NULL, `username` varchar(16) NOT NULL, `password` varchar(16) NOT NULL, PRIMARY KEY (`id`) ); -- Data for table `users` INSERT INTO `users` VALUES (1,'alice','secret'),(2,'bob','secret');
|This database-related article is a stub. You can help Wikipedia by expanding it.|