How To Use Mysql For Newbies|HackerWalaBlog - Deals And Offers

How To Use Mysql For Newbies


MySQL is one of the most famous freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). Get a copy of  MySQL and start MySQL command line client. Below you will find some of the most useful MySQL commands



Mysql-logo


#1 CREATE DATABASE NEWDB ;

This command creates a new Database called "NEWDB " . You may change "NEWDB" to any name you like. A database once created, is ready for further use. You must not create a new database every time you log on to MySQL. You can use same database to store multiple tables.


#2 USE NEWDB;

This command is use to open the database that we have created. You need to open the database before making queries upon the data in tables of a database.


#3 CREATE TABLE SOMETABLE(NAME char(25),PHONE integer) ;

This command is use to create a new table named "SOMETABLE" with 2 Column "NAME", "PHONE". NAME is of char type with maximum size of 25 character and PHONE is of Integer type.


#4 INSERT INTO SOMETABLE ('HACKERWALABLOG',123456789) ;

This command is use to insert value into table we have created above.

#5 SELECT * FROM SOMETABLE ;

This command is use to show a graphical representation of the table we have created.


What would you add as the #6 most useful MySQL command? Let me know in the comments below!

Related Posts:

Best C Programming Books You Must Check

How To Make A Wi-Fi Jammer

No comments:

Post a Comment

HackerWalaBlog has a zero tolerance spam policy and I reserve the right to accept or reject your comment. Any comment related to the topic is most welcome.