0 Days0 Hours0 Minutes

We are coming soon!

40%

We'll notify you when the site is live:

Copyright © 2025 3p3L_H!j4w_s3rv3r | Published By epelhijaw | Powered By Blogger
Design by ROY | Blogger Theme by ROY

Bilangan Visitor

Copyright : 3p3L_H!j4w. Dikuasakan oleh Blogger.

Ads 468x60px

Popular Posts

Script

Daisypath Anniversary tickers

Rabu, 2 Oktober 2013

Database Mysql Tutorial

Database Mysql Tutorial



#mysql -u root -p   <=== Untuk acess ke mysql

DATABASE

#show databases                  <=== Untuk Display senarai database yang wujud.

#create database <namadatabase>; <=== Untuk Create Database [New]

#use <namadatabase>;        <=== Guna database tsb.

#drop <namadatabase>;     <=== Delete databse tsb.

TABLE

#show tables;                      <=== Untuk Display senarai table yang wujud.

#create table <namatable>; <=== Untuk Create Table [New]

#drop <namatable>;            <=== Delete databse tsb.

#alter table <namatable>     <=== Select table


#Rename table <namatablelama> to <namatablebaru>;


ATTRIBUTE



#desc <tablename> <=== Untuk View Attribute [list]

#alter table <namatable>
-->modify <Attributes><declaration>;
-->drop <Attributes><declaration>;     <=== Untuk modify,Add,Drop Attribute
-->add <Attributes><declaration>;

#

DATA
#insert into <namatable>
-->values <Attributes><declaration>(ikut attributes) ;   <=== Untuk tambah data.

#select * from <namatable>       <=== Display segala maklumat /data
#


SET PK/FK
Primary key 
#create table <namatable>(<nama attribute> <variable> primary key);
#Alter table <namatable> add primary key (<namaattribute>);
Alter table <namatable> drop primary key; <===Remove PK
Foreign key
#Alter table<namatable> 
-->add foreign key (<namaattribute>) references <namatable sumber>(<Namaattribute sumber>);

SELECT
#select<attribute> from <namatable>      <=== Pattern Matching.
->where <attributeterpilih> like '<hurufterpilih>%';

#select<attribute> from <namatable>   <=== Column Ordering.
->order by <attributeterpilih> asc;  

#select<attributeterpilih> from <namatable>; <=== Display attribute yang terpilih

#select*from <tablename>;   <=== Display all Data dalam table

#select<namaattributeterpilih> from <namatable> <== Search data yang mempunyai value yg sama.
->where ><value>  ataupun <<value>;

##select*from <namatable>
->where <attribute bersama maklumat> or <attribute bersama maklumat>

#select<namaattributeterpilih> from <namatable>
->where <atributterpilih> between <value> and <value>

























Followers

Feature

s