Create Table Query
Today i am showing how to add new table in SQL.But in this blog i am attaching php back end language for
run the query.
following steps are included..
- open notepad or other text editor .
- open xampp /wamp
- run apache and mysql server
- than you write connection of database
- than you write the following code its and dummy table you can change on your choice
$q= "CREATE TABLE Student ( s_id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, email VARCHAR(50), reg_date TIMESTAMP)"; - Than you required to write
- $sql=mysqli_query($q);
- successfully your table created in your desired database.
if the following blog helpful than write a comment for more blogs.
for further query contact us
regards
hadiuppal99@gmail.com......
No comments