Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Most important SQL Query under MYSQL Database for developers:-

If you are directly read this article then first read the following article for database knowledge, you can learn database fundamentals after that you can learn SQL easily.



Article for database fundamentals:-


https://www.shivatutorials.com/2020/08/database-tutorials-sql-tutorials-mysql.html


Article for MYSQL Fundamentals:-


https://www.shivatutorials.com/2020/08/mysql-for-developers.html



Now many GUI tools have provided by many database software such as MYSQL ( MYSQL YOG, PHPMYADMIN) Oracle ( SQL Developer), and MS-SQL(Management Studio).


But if you create an application then you should knowledge of basic SQL Command and SQL Query.

SQL Command has been divided into four different languages.



1) DDL(Data definition language):-


Create Command:-  It is used to create a database, table, and other database objects such as views, triggers, user's, index, etc.


In the MYSQL database, we will use the create command mostly to create a database and table.


Syntax to create the database:-

create database databasename;


Syntax to create a table:-

create table tablename(columname datatype(length) primary key, columnname datatype(length));

for example, we want to create a database for the job portal then we will write.


create database jobportal.


for example, if we want to create a table for job seeker then we will create the following SQL queries.


create table jobseeker(jobseeker varchar(50)  primary key, fullname varchar(50), mobileno char(10),email varchar(50), qualification varchar(50), technologty varchar(100),password varchar(10));


How to run these SQL Query under XAMPP:-


XAMPP provides two different options to run a SQL Query.


open PHPMyAdmin and open SQL options then write a query, it provides textarea where we can write SQL query options.


Step1st:-




Step2nd:-

Click on SQL options



Step3rd:-



Step4th:-

Write Query for database and table:-

1) Create database command:-

create database jobportal.



2) select database command

      use databasename


3) Create a table command

create table jobseeker(jobseeker varchar(50)  primary key, fullname varchar(50), mobileno char(10),email varchar(50), qualification varchar(50), technologty varchar(100),password varchar(10));




XAMPP also provide MYSQL Console to write SQL Query on Console Window.

1)  open command prompt and navigate c:/xampp/MySQL/bin



you can manage all command here

to run table query first select database:-