# SQL Basic Syntax

21 01 2010

INSERT INTO
Digunakan untuk memasukkan record baru ke dalam suatu tabel
Syntax:
INSERT INTO table_name
VALUES (value1, value2, value3,...)

SELECT
Digunakan untuk memilih data dari basis data
Syntax:
SELECT column_name
FROM table_name

atau
SELECT * FROM table_name

WHERE
Digunakan untuk filter record
Syntax:
SELECT column_name
FROM table_name
WHERE column_name operator value

ORDER BY
Digunakan untuk mengurutkan hasil oleh kolom tertentu
Syntax:
SELECT column_name
FROM table_name
ORDER BY column_name DESC

note: DESC digunakan bila anda ingin menyortir record ke dalam urutan.

UPDATE
Digunakan untuk mengupdate record yang ada di tabel
Syntax:
UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value

DELETE
Digunakan untuk menghapus record data pada tabel
Syntax:
DELETE FROM table_name
WHERE some_column=some_value

reff: w3schools


Actions

Information

2 responses

22 01 2010
gombez

met ultah bozzz…😀
tambah tuwir ae rek… hohoho

22 01 2010
localhost80

hehehe, thanks mbez…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: