Akhirnya Nemu juga Kumpulan Script untuk SQL , sebenernya artikel script ataupun kode sql ini hanya untuk tempat penyimpanan data saya aja qoo biar gak lupa gitu !! tapi kalo anda juga lagi belajar sql, yaudah di lihat aja, biar pinter mendalami sql nya bareng-bareng. hehehhe .

SQL StatementSyntax
AND / ORSELECT column_name(s)
FROM table_name
WHERE condition
AND|OR condition
ALTER TABLEALTER TABLE table_name
ADD column_name datatypeor
ALTER TABLE table_name
DROP COLUMN column_name
AS (alias)SELECT column_name AS column_alias
FROM table_nameor
SELECT column_name
FROM table_name  AS table_alias
BETWEENSELECT column_name(s)
FROM table_name
WHERE column_name
BETWEEN value1 AND value2
CREATE DATABASECREATE DATABASE database_name
CREATE TABLECREATE TABLE table_name
(
column_name1 data_type,
column_name2 data_type,
column_name2 data_type,
...
)
CREATE INDEXCREATE INDEX index_name
ON table_name (column_name)or
CREATE UNIQUE INDEX index_name
ON table_name (column_name)
CREATE VIEWCREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
DELETEDELETE FROM table_name
WHERE some_column=some_valueor
DELETE FROM table_name
(Note: Deletes the entire table!!)
DELETE * FROM table_name
(Note: Deletes the entire table!!)
DROP DATABASEDROP DATABASE database_name
DROP INDEXDROP INDEX table_name.index_name (SQL Server)
DROP INDEX index_name ON table_name (MS Access)
DROP INDEX index_name (DB2/Oracle)
ALTER TABLE table_name
DROP INDEX index_name (MySQL)
DROP TABLEDROP TABLE table_name
GROUP BYSELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HAVINGSELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HAVING aggregate_function(column_name) operator value
INSELECT column_name(s)
FROM table_name
WHERE column_name
IN (value1,value2,..)
INSERT INTOINSERT INTO table_name
VALUES (value1, value2, value3,....)or
INSERT INTO table_name
(column1, column2, column3,...)
VALUES (value1, value2, value3,....)
INNER JOINSELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name
LEFT JOINSELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
RIGHT JOINSELECT column_name(s)
FROM table_name1
RIGHT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
FULL JOINSELECT column_name(s)
FROM table_name1
FULL JOIN table_name2
ON table_name1.column_name=table_name2.column_name
LIKESELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern
ORDER BYSELECT column_name(s)
FROM table_name
ORDER BY column_name [ASC|DESC]
SELECTSELECT column_name(s)
FROM table_name
SELECT *SELECT *
FROM table_name
SELECT DISTINCTSELECT DISTINCT column_name(s)
FROM table_name
SELECT INTOSELECT *
INTO new_table_name [IN externaldatabase]
FROM old_table_nameor
SELECT column_name(s)
INTO new_table_name [IN externaldatabase]
FROM old_table_name
SELECT TOPSELECT TOP number|percent column_name(s)
FROM table_name
TRUNCATE TABLETRUNCATE TABLE table_name
UNIONSELECT column_name(s) FROM table_name1
UNION
SELECT column_name(s) FROM table_name2
UNION ALLSELECT column_name(s) FROM table_name1
UNION ALL
SELECT column_name(s) FROM table_name2
UPDATEUPDATE table_name
SET column1=value, column2=value,...
WHERE some_column=some_value
WHERESELECT column_name(s)
FROM table_name
WHERE column_name operator value

Source : http://www.w3schools.com/sql/sql_quickref.asp



Posting Lama Posting Lebih Baru

Comments :

ada 15 komentar ke “KUMPULAN SCRIPT ATAU KODE SQL”
Wisnu mengatakan...
pada  

Ringkas dan cukup lengkap.. boleh di simpen untuk catatan ya. thanks

Anonim mengatakan...
pada  

Kurang lengkap ccd

Anonim mengatakan...
pada  

Iya bener cacad banget

Anonim mengatakan...
pada  

eh jangan gitu lu
hargain dikit walaupun cuma seribu

Anonim mengatakan...
pada  

ah bacod lu

Anonim mengatakan...
pada  

O atuh

Anonim mengatakan...
pada  

Y

Bayu Parindra mengatakan...
pada  

makasih bro

Anonim mengatakan...
pada  

apaan lu cacad makasih makasih !

Anonim mengatakan...
pada  

ehh lu udah gila yak cacad

Anonim mengatakan...
pada  

Ciyus?

Julian's mengatakan...
pada  

enelan deh :p

Julian's mengatakan...
pada  

O aja deh

Anonim mengatakan...
pada  

wah ternyata elu yang ngebacotin blog ini

Efringky aquarius mengatakan...
pada  

thank's

Poskan Komentar


Copyright © 2014 - Aldi Ferdiyan - My Facebook - Powered By Pasa Iklan / Pasang Iklan Gratis


"KUMPULAN SCRIPT ATAU KODE SQL"

Sewa Laptop Infonindo.com - Penyewaan Laptop - Sewa Laptop di jakarta - Warta kesehatan - Warta Sehat - Profil - Seks - alkes lab - Obat Penyakit Ibu Anak