Create table in database using terminal command
by satheeshkumar[ Edit ] 2013-01-16 13:08:47
Create table in database using terminal command,
Follow the below steps,
1.Login to mysql .Which promt to your MySQL password.
CODE: SELECT ALL
mysql -u root -p
2.If you logged in successfully you will get promt as
CODE: SELECT ALL
mysql>
3.If you want to create a database ,use the following command,
CODE: SELECT ALL
create database test;
4.To Create a table in database ,first has to selete the appropriate database using the following command,
CODE: SELECT ALL
use test;
5.Now you can create the table using create table command:
CODE: SELECT ALL
CREATE TABLE users_tb (id INT( 3 ) NOT NULL AUTO_INCREMENT,name VARCHAR( 25 ) NOT NULL , UNIQUE (id));