Maniruzzaman Akash's Blog

Maniruzzaman Akash, A programmer, A web programmer, a helpful person to share knowledge and everything..

  • Home
  • Programming
    • C Programming
    • Java Programming
    • C++ Programming
    • C# Programming
    • Python Programming
    • Data Structure
  • Web
    • HTML
    • CSS
    • Javascript
    • PHP
    • AJAX
    • XML
  • FrameWork
    • Bootstrap(CSS)
    • Laravel 5(PHP)
  • Database
    • MySQL
    • Oracle
    • SQL Server
  • Android
    • Android Development
  • Mathematics
    • Numerical Methods
  • Others
    • My Articles
    • Download Ebooks
    • Mathematics
    • Difference Between
  • Contact
Showing posts with label MySQL Database. Show all posts
MySQL Database

MySQL - WHERE statement

Tuesday, December 27, 2016 By Maniruzzaman Akash 0 Comments
Welcome to our MySQL lecture..
Today we will learn about MySQL WHERE clause.

Why Used WHERE in MySQL:

When we want to search some data from a condition or any other criteria then we use MySQL WHERE clause. That means to search data from a condition, we use WHERE statement in MySQL.

Rules of Writing WHERE clause in MySQL:


   SELECT column_name,column_name
   FROM table_name
   WHERE column_name operator value;

So, look at the operator . We can use the following operator here:
 =                   --->  Equal operator
>                    --->  Greater than operator
<                    --->  Less than operator
>=                  --->  Greater than or equal operator
<=                  --->  Less than or equal operator
<>                  --->  Not Equal operator
BETWEEN   --->  To check two number using between condition
LIKE            --->  To search anything like that word
IN                 --->  To check anything in the new relation or in new condition.

Example of MySQL WHERE clause:

In our second lecture of MySQL we have created a table and which is like this :
Let Insert some data first to search as our specific condition:

  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402011', 'Jhon', 'jhon@gmail.com', 'Delhi, India');
  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402039', 'Nur', 'Nur@yahoo.com', 'Bagerhat, Bangladesh');
  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402043', 'Musa', 'Musa@yahoo.com', 'Nepal');
  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402044', 'XXX', 'xxx@yahoo.com', 'Nepal');
  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402014', 'Roshan', 'roshan@gmail.com', 'Brazil');
  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402020', 'Roshan', 'roshan_india@gmail.com', 'India');
  INSERT INTO Student (ID, Name, Email, Address) VALUES ('1402030', 'Ronin', 'ronin@gmail.com', 'Brazil');


Ok, that's enough our Student table is like now:




Query 1: Select all from Student table of student name Roshan.



SELECT *
FROM Student
WHERE name = 'Roshan';


Query 2: Select all the names from Student table of student whose address is Brazil.



SELECT Name
FROM Student
WHERE Address = 'Brazil';


Query 3: Select all from Student table whose ID is less than or equal 1402030.



SELECT *
FROM Student
WHERE ID <= '1402030';


Query 4: Select all from Student table whose ID is between 1402030 and 1402014.



SELECT *
FROM Student
WHERE ID BETWEEN '1402030' AND '1402014';



Ok, thanks for staying with us. Run the code and see the output and get the exactly what you want. Please comment if you face any problem.


Continue reading
Share:
Views:
MySQL Database

MySQL - SELECT statement in MySQL

By Maniruzzaman Akash 0 Comments

Welcome to our MySQL 5th Lecture:

Today we'll learn how to retrieve the data from any table using SQL query. The syntax is basically SELECT statement.

SELECT statement:

Select statement of SQL is looks like this:

1) Select all from a table -
   SELECT * 
   FROM table_name;

2) Select column values from a table -
   SELECT column_name 
   FROM table_name;

3) Select More column values from a table -
   SELECT column_name, column_name, column_name 
   FROM table_name;


Now go to example:
1) We want to know the all student information from Student table. Query will be -

   
   SELECT * 
   FROM Student;



2) We want to know the names of student from Student table. Query will be -

   
   SELECT Name 
   FROM Student;




3) We want to know the names, email and address of student from Student table. Query will be -

   
   SELECT Name, Email, Address
   FROM Student;





Thank you for staying with us..Wait for our next tutorial...
Continue reading
Share:
Views:
MySQL Database

MySQL - INSERT values in the table

By Maniruzzaman Akash 0 Comments

Our MySQL 4th Lecture:

In our previous tutorial we've created a table named Student where there were 4 attribute or column and now we will insert a row in our table by mySQL query -

Insert code for all tables:
   INSERT INTO table_name
   VALUES (value1,value2,value3,value4,...);



And for our Student table our Code will be :
   INSERT INTO student (ID, Name, Email, Address) 
   VALUES ('1402036', 'Maniruzzaman Akash', 'manirujjamanakash@gmail.com', 'Ishwarganj, Mymensingh, Bangladesh');


Then a row will be inserted in the table Student. Like this - Click Browse tab and you can get the value which has inserted in the table



We can also insert value from XAMPP control panel using Graphical User Interface and it is just click the insert tab and insert like me...


Thanks for staying with our MySQL tutorial and in our next tutorial we'll learn about SELECT statement in SQL..

Continue reading
Share:
Views:
MySQL Database

MySQL - Create table by MySQL and also from XAMPP GUI

By Maniruzzaman Akash 0 Comments

Our 3rd Lecture on MySQL -

Today we'll learn how to create table in MySQL by SQL query and also from XAMPP. I'll recommend to see the previous two tutorials on MySQL to complete today's lecture.

In our previous lecture we've created a database called db_new. and now we'll create a table called student in this database.

Why have to create table in MySQL:

So, I think it is necessary to learn that why need to create a table in MySQL. In any relational database management system we need to relation one table with another to make our work so easy and simple. For this we have to create table.

Create Table Syntax in MySQL:

CREATE TABLE table_name
(
    column_name1 data_type(size),
    column_name2 data_type(size),
......
);

So we need to create a Student table where student has a ID, Name, Email, Address attributes. The SQL syntax is the -

For doing this we need to select our database first. Then write the query in SQL tab.

CREATE TABLE Student
(
    ID INT(11) PRIMARY KEY,
    Name VARCHAR(30) NOT NULL,
    Email VARCHAR(50) NOT NULL,
    Address TEXT NOT NULL
);

After running this SQL query a table Student will be created with among attributes -  ID, Name, Email and Address. Which will look like this.




We can also do this by using Graphical User Interface of XAMPP. Like this -



Thanks for staying with us. Wait for our next tutorial about MySQL..



Continue reading
Share:
Views:
MySQL Database

MYSQL - Create database from XAMPP and SQL

By Maniruzzaman Akash 0 Comments
Before starting this lecture you need to read our previous lecture about installing XAMPP. Please see the previous tutorial first to complete today tutorial.
See the Installing XAMPP and starting MySQL tutorial.


Create a database in XAMPP:

There are two ways to create a database in XAMPP. We can use both Graphical User Interface and SQL statement to create database in XAMPP


1) First way Graphical User Interface way:





Then press the Create button to create a database in XAMPP and you've created a database.

2) Second Way SQL Syntax to create a MySQL database is:



  CREATE DATABASE db_new;


Now a database has created by this name db_new in your server.




Continue reading
Share:
Views:
MySQL Database

MySQL - Starting Installing environment and XAMPP setup

By Maniruzzaman Akash 0 Comments

About MySQL - 

MySQL is an open source database management system by Oracle. It is a relational database management system and is fully open source and all its document is found over - http://www.mysql.com/ 

Starting your MySQL programming - 

MySQL works in database and it needs Server to run the code. There are so many Graphical User Interface to run MySQL code to execute. They are basically two most popular open source cross platform web server. They are- 
  1. Xampp
  2. Wamp
In our lecture we will work throw Xampp, You can use Wamp anymore, both are the same.

Installing XAMPP and Setup - 

Xampp is a free and open source cross-platform web server solution stack package developed by Apache.
You can download XAMPP free from their Website -
Download XAMPP - https://www.apachefriends.org/download.html

You may choose your operating system and then download the best version for your self.
You may be see the instructions video to complete your setup of XAMPP-



After completion of your installation your XAMPP server looks like this-




In your case you may be see only few database in the left sidebar like the image.

Thanks and if you face any problem to installing XAPP, please comment here. We'll solve it together.

Continue reading
Share:
Views:
Difference Between MySQL Database

What is the difference between Data Ware House and Data mart

Friday, November 25, 2016 By Maniruzzaman Akash 0 Comments

What is the difference between Data Ware House and Data mart


Sn Data Ware House Data Mart
01 Data warehouse can apply in wide or in huge range data or in a whole organization. Data Mart can apply in small range of sector like in a department pf an organization.
02 Data warehouse can carry or hold multiple subject areas data. Data Mart can carry the data of a single or specific subject area's data.
03 Data warehouse can hold data from multiple sources. Data Mart can hold limited data sources in it's design.
04 Data warehouse is difficult to design. Data Mart is easy to design.
05 Data warehouse needs long time to implement or to design fully. Data Mart doesn't take much time to implement or to design.
06 Data warehouse occupies large memory. Data Mart occupies limited memory.
This is the basic difference between data warehouse and data mart.
Continue reading
Share:
Views:
Older Posts Home
Subscribe to: Posts ( Atom )

Popular Posts

  • Numerical Methods 20 Multiple Choice Questions and Answers
  • Consider a hypothetical 32-bit microprocessor having 32-bit instructions: Solutions
  • List and briefly define two approaches to dealing with multiple interrupts
  • The hypothetical machine has two I/O instructions: 0011= Load AC fro I/O 0111= Store AC to I/O Solutions
  • What are the characteristics of Digital IC's?-Solution
  • Mid Square Method Code implementation in C and MatLab
  • List and briefly define the possible states that define an instruction execution
  • BFS, DFS, DLS in Tree implementation in C
  • Download Laravel Offline Documentation as HTML
  • Simpson's 1/3 Code in Matlab

Category

Advanced PHP Android Developement Articles Artificial Intelligenece Blogger Tips Blogging Career Bootstrap Offline Documentation Bootstrap Templates C Programming Computer Architecture Data Structure Difference Between Download Documentation Download Ebook Download Free Blog Template Earning Money Electrical Electronics Guest Posts HTML Java Programming Laravel Laravel Bangla Tutorial MatLab Code My Videos MySQL Database Numerical Methods Offline Documentation Recent Topics Simulation and Modeling Unity Game Development Web Design Web Development

LIKE ME ON FACEBOOK

TAGS

  • Advanced PHP (3)
  • Android Developement (5)
  • Articles (6)
  • Artificial Intelligenece (3)
  • Blogger Tips (5)
  • Blogging Career (1)
  • Bootstrap Offline Documentation (1)
  • Bootstrap Templates (1)
  • C Programming (14)
  • Computer Architecture (5)
  • Data Structure (11)
  • Difference Between (1)
  • Download Documentation (2)
  • Download Ebook (3)
  • Download Free Blog Template (2)
  • Earning Money (1)
  • Electrical Electronics (1)
  • Guest Posts (1)
  • HTML (4)
  • Java Programming (2)
  • Laravel (3)
  • Laravel Bangla Tutorial (1)
  • MatLab Code (2)
  • My Videos (3)
  • MySQL Database (7)
  • Numerical Methods (9)
  • Offline Documentation (1)
  • Recent Topics (1)
  • Simulation and Modeling (2)
  • Unity Game Development (3)
  • Web Design (3)
  • Web Development (1)

Join Google+

Maniruzzaman Akash
View my complete profile

Join With Me

Site Visitors

Best Sites For a programmer

  • URI Online Judge Solution By Me
  • StackOverFlow
  • W3 School
  • Git Hub - Store your Every Document

Popular Posts

  • What are the characteristics of Digital IC's?-Solution
  • The hypothetical machine has two I/O instructions: 0011= Load AC fro I/O 0111= Store AC to I/O Solutions
  • Consider a hypothetical 32-bit microprocessor having 32-bit instructions: Solutions
  • How to import Excel,CSV file in Laravel And insert data in database
  • List and briefly define the possible states that define an instruction execution
  • What is Blue Whale Game ? Why people suicide?
  • List and briefly define two approaches to dealing with multiple interrupts
  • ফিফা ওয়ার্ল্ড কাপ ২০১৮ শিডিউল এবং সমস্ত আপডেট- FIFA World Cup 2018 - Bangladesh Time Schedule
  • BFS, DFS, DLS in Tree implementation in C
  • Numerical Methods 20 Multiple Choice Questions and Answers

Earn Money From Your site

Translate To your language

Categories

Advanced PHP (3) Android Developement (5) Articles (6) Artificial Intelligenece (3) Blogger Tips (5) Blogging Career (1) Bootstrap Offline Documentation (1) Bootstrap Templates (1) C Programming (14) Computer Architecture (5) Data Structure (11) Difference Between (1) Download Documentation (2) Download Ebook (3) Download Free Blog Template (2) Earning Money (1) Electrical Electronics (1) Guest Posts (1) HTML (4) Java Programming (2) Laravel (3) Laravel Bangla Tutorial (1) MatLab Code (2) My Videos (3) MySQL Database (7) Numerical Methods (9) Offline Documentation (1) Recent Topics (1) Simulation and Modeling (2) Unity Game Development (3) Web Design (3) Web Development (1)

Subscribe To This Site To Get Latest Article On Programming or web

Posts
Atom
Posts
All Comments
Atom
All Comments
© 2016 Maniruzzaman Akash's Blog | All rights reserved
Developed By Maniruzzaman Akash Created By Responsive Blogger Templates | Distributed By Gooyaabi Templates