Sunday, 5 June 2016

How to create a new table in existing database?

1. mysql -u root -p
     press enter button then type your password of mysql.
2. mysql> show databases;
3. mysql> use author;   (Author is an database in mysql).
4. mysql> show tables;
5. mysql> create table books(book_name varchar(20), editions int(10));
6. mysql>insert into books values('rahul',4);

Now you can check on your database tables is added one more table.