anantamu.com


PHP MySQL Create Table


Table is a collection data stored in a table. It consists of columns and rows.

ID is primary key, which contains unique value and auto increment value.


CREATE TABLE

CREATE TABLE TABLE_NAME ( ID INT(5) UNSIGNED NOTNULL PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(50) NOTNULL, DOB DATE NOTNULL )


CREATE TABLE in Database

<?php
$servername = "localhost";
$username1 = "root";
$password1 = "";
$dbname = "sample";
//server connection
$connection = mysqli_connect($servername, $username1, $password1, $dbname);
if (!$connection) {
die("Connection failed: " . mysqli_connect_error());
}

$sqlQuery = "CREATE TABLE profile
(
Id int(5) NOT NULL AUTO_INCREMENT, 
Name varchar(50),
Address varchar(500)
)";
// query is excute here
mysqli_query($sqlQuery,$connection);
mysqli_close($connection);
?>
                    



List of All 223 Banks



Bank IFSC CODE