Create and Managing Table in MySQL

 

How to create database and Table

  • Use query: create database name;
    • Ex: create database example1;
    • after that : use example1;
    • create table name( attribute1 type, attribute2 type, ....)
    • Example: create table table1(
    •     -> id int primary key not null auto_increment,
    •     -> name varchar(50));
Type of MySQL data : Read more

How delete database and table

  • We use method Drop to delete database or table
    • Delete table
      • drop table name;
    • Delete database
      • drop database name;

How to show database and table

  • We use method Show  for database and Describe or Desc for table database
    • Database
      • show databases; (not database also have plural(s) word  Databases)
    • Table 
      • describe tablename; 
      • desc tablename;
Link of website to know more about all of method in MySQL 


Previous Post Next Post