BLOGGER TEMPLATES AND TWITTER BACKGROUNDS

Kamis, 24 September 2009

Tugas MySQL BAB 4

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.0.67-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select lcase('teknik informatika');

+-----------------------------+

| lcase('teknik informatika') |

+-----------------------------+

| teknik informatika |

+-----------------------------+

1 row in set (0.11 sec)

mysql> select lower('teknik informatika');

+-----------------------------+

| lower('teknik informatika') |

+-----------------------------+

| teknik informatika |

+-----------------------------+

1 row in set (0.02 sec)

mysql> select ucase('tehnik informatika');

+-----------------------------+

| ucase('tehnik informatika') |

+-----------------------------+

| TEHNIK INFORMATIKA |

+-----------------------------+

1 row in set (0.00 sec)

mysql> select upper('tehnik informatika');

+-----------------------------+

| upper('tehnik informatika') |

+-----------------------------+

| TEHNIK INFORMATIKA |

+-----------------------------+

1 row in set (0.00 sec)

mysql> select substring('tehnik infornatika',6);

+-----------------------------------+

| substring('tehnik infornatika',6) |

+-----------------------------------+

| k infornatika |

+-----------------------------------+

1 row in set (0.05 sec)

mysql> select substr('komputer',3);

+----------------------+

| substr('komputer',3) |

+----------------------+

| mputer |

+----------------------+

1 row in set (0.00 sec)

mysql> select substring('tehnik informatika',2,6);

+-------------------------------------+

| substring('tehnik informatika',2,6) |

+-------------------------------------+

| ehnik |

+-------------------------------------+

1 row in set (0.01 sec)

mysql> select substring('tehnik informatika',-11,5);

+---------------------------------------+

| substring('tehnik informatika',-11,5) |

+---------------------------------------+

| infor |

+---------------------------------------+

1 row in set (0.08 sec)

mysql> select left('tehnik informatika',6);

+------------------------------+

| left('tehnik informatika',6) |

+------------------------------+

| tehnik |

+------------------------------+

1 row in set (0.00 sec)

mysql> select right('tehnik informatika',11);

+--------------------------------+

| right('tehnik informatika',11) |

+--------------------------------+

| informatika |

+--------------------------------+

1 row in set (0.00 sec)

mysql> select ascii('5');

+------------+

| ascii('5') |

+------------+

| 53 |

+------------+

1 row in set (0.03 sec)

mysql> select ord('A') ord('a');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near 'ord('

a')' at line 1

mysql> select hex(2250;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '' at

line 1

mysql> select ord('A'),ord('a');

+----------+----------+

| ord('A') | ord('a') |

+----------+----------+

| 65 | 97 |

+----------+----------+

1 row in set (0.00 sec)

mysql> select hex(225);

+----------+

| hex(225) |

+----------+

| E1 |

+----------+

1 row in set (0.02 sec)

mysql> select char(66);

+----------+

| char(66) |

+----------+

| B |

+----------+

1 row in set (0.11 sec)

mysql> select char(66,85,78,65,70,73,84);

+----------------------------+

| char(66,85,78,65,70,73,84) |

+----------------------------+

| BUNAFIT |

+----------------------------+

1 row in set (0.03 sec)

mysql> select bin(8);

+--------+

| bin(8) |

+--------+

| 1000 |

+--------+

1 row in set (0.02 sec)

mysql> select insert('BunNugroho'3,1,'nafit');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '3,1,'

nafit')' at line 1

mysql> select insert('BunNugroho'3,1,'nafit');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '3,1,'

nafit')' at line 1

mysql> SELECT INSERT('BunNugroho'3,1,'nafit ');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '3,1,'

nafit ')' at line 1

mysql> select lenght('tehnik informatika');

ERROR 1305 (42000): FUNCTION lenght does not exist

mysql> select locate('format','tehnik informatika');

+---------------------------------------+

| locate('format','tehnik informatika') |

+---------------------------------------+

| 10 |

+---------------------------------------+

1 row in set (0.02 sec)

mysql> select ltrim(' tehnik informatika');

+--------------------------------+

| ltrim(' tehnik informatika') |

+--------------------------------+

| tehnik informatika |

+--------------------------------+

1 row in set (0.00 sec)

mysql> select trim(leading '+' from '++++MYSQL++++');

+----------------------------------------+

| trim(leading '+' from '++++MYSQL++++') |

+----------------------------------------+

| MYSQL++++ |

+----------------------------------------+

1 row in set (0.03 sec)

mysql> select space(15);

+-----------------+

| space(15) |

+-----------------+

| |

+-----------------+

1 row in set (0.00 sec)

mysql> select replace(www.lampung.go.id','.','dot');

'> '

-> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '.id',

'.','dot');

'' at line 1

mysql> select replace(www.lampung.go.id','.', 'dot ');

'> '

-> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '.id',

'.', 'dot ');

'' at line 1

mysql> select replace('www.lampung.go.id','.', 'dot ');

+--------------------------------------------+

| replace('www.lampung.go.id','.', 'dot ') |

+--------------------------------------------+

| wwwdot lampungdot godot id |

+--------------------------------------------+

1 row in set (0.03 sec)

mysql> select reverse(ABCDEFHTIJK');

'> '

-> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '');

'' at line 1

mysql> select reverse('ABCDEFHTIJK');

+------------------------+

| reverse('ABCDEFHTIJK') |

+------------------------+

| KJITHFEDCBA |

+------------------------+

1 row in set (0.00 sec)

mysql> select quote("sekarang hari jum'at");

+-------------------------------+

| quote("sekarang hari jum'at") |

+-------------------------------+

| 'sekarang hari jum\'at' |

+-------------------------------+

1 row in set (0.08 sec)

mysql> select LPAD('TI',5,'++');

+-------------------+

| LPAD('TI',5,'++') |

+-------------------+

| +++TI |

+-------------------+

1 row in set (0.00 sec)

mysql> select RPAD('TI',8,'++');

+-------------------+

| RPAD('TI',8,'++') |

+-------------------+

| TI++++++ |

+-------------------+

1 row in set (0.02 sec)

mysql> select elt(1,'TI','TK','SI',MI','KA');

'> '

-> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near '','KA

');

'' at line 1

mysql> select elt(1,'TI','TK','SI','MI','KA');

+---------------------------------+

| elt(1,'TI','TK','SI','MI','KA') |

+---------------------------------+

| TI |

+---------------------------------+

1 row in set (0.03 sec)

mysql> select field('TI','TI','TK','SI','MI','KA');

+--------------------------------------+

| field('TI','TI','TK','SI','MI','KA') |

+--------------------------------------+

| 1 |

+--------------------------------------+

1 row in set (0.00 sec)

mysql> select find_in_set('TK','TI,TK,SI,MA,KA');

+------------------------------------+

| find_in_set('TK','TI,TK,SI,MA,KA') |

+------------------------------------+

| 2 |

+------------------------------------+

1 row in set (0.00 sec)

mysql>

Senin, 14 September 2009

Mengutamakan Persahabatan

Di Tatasurya,di Bumi, di Indonesia, di sebuah desa yang besar yang kaya akan tanah yang subur dan tepatnya lagi di ladang tempat bermain anak-anak(gaq penting banget)...

Ricky:"will yuu kita main kejar-kejaran"
Willy:"yuu kita ajak Kevin dan Hendra juga yha"
Ricky:"yu"

setiba di rumah Kevin...

Ibu Kevin:"Hai kalian mau cari Kevin ya?dia sedang di rumah Hendra..."
Willy:"ow begitu ya~makasih ya tante"
Ibu kevin:"sama-sama"
Ricky:"kalau boleh tau kemana ya?"
Ibu kevin:"Katanya ia kerumah Hendra~"


Ricky dan Willy pu ke rumah Hendra~

Ricky:"Hen......"
Hendra:"uit??"
Ricky:"kevin mana?"
Hendra:"Kevin tuh lagi di WC~"

beberapa saat pun Kevin Kluar~

Willy:"Kev maen yuk?"
Kevin:"Gaq ah malas~"
willy:"kok gitu? uda beberapa hari ini kamu gaq pernah maen lagi sama kita~??ada apaan seh?"
Kevin:"Gaq kok malas aja...~"
Willy:"lu lagi ehm...ehm ya?"
Kevin:"paan seh??"
Willy:"itu lho Poling in loph??"
Kevin:"Falling in love kalek??Ops..!!"
Willy:"Piwid...~ma siapa tuh?"
Kevin:"mau tauk aj~!!dah ya akuw pulang dulu~"

kevin pun langsung meninggalkan mereka~

Besoknya di Skul....

Guru BI:"Kevin!!Mengapa kamu melihat Cindy terus?"
Steven:"Biasa pak....jatuh cinta lagi...lagi2 kevin jatuh cinta~"
satu kelas:Cieeee....

"tuh kan pasti kevin sedang jatuh cinta~"bisik willy kepada Ricky,"Ha???Gaq dhe gaq ikot-ikotan~"balas Ricky~"Halah jangan-jangan lu ud ada lagi~"jawab willy

Guru:"Diam-diam smua vrisik sekali kalian cuam 1 berita kok~"
Sekelas:"uuuuuuuu...."

Setelah jam sepulang sekolah~

Hendra:"wil,wil...!!!"
WillY:"hm?"
Hendra:"Will lu tau gaq cara dapetin Cindy?"
Willy:"haaa??lu suka Cindy gituh?"
Hendra:"ssstt....ntar ketahuan~"
Willy:"ew tembak aj dia~"
Hendra:"tembak~klo tembak ntar mari dung~"
Willy:"cape deh~tembak itu lho~nyatakan cinta mu~"
Hendra:"ok dhe~"

sepulang sekolah willy-pun kerumah Ricky~

Willy:"Ric lu tau gaq~kayanya Kevin dan Hendra suka...."
Ricky:"haaa???HOMO???"
Willy:"ngeres lu,denger dulu~mereka berdua tuh kayanya suka Cindy~"
Ricky:"wow bisa brantem nie~"
Willy:"tapi khan blom tentu~
Ricky:"semoga aj~"

besok sepulang sekolah lagi~
dan di belakang sekolah tepatnya ada kejadian seru~
Kevin dan Hendra sama-sama menyatakan cintanya kepada Cindy~

Willy:"Rick cari Kevin dan Hendra yuk~?"
Ricky;"YU........"

willy dan ricky pun melihat kejadian yang menghebohkan tersebut~

Willy:"tidakkkk......Cindy itu milik ku!!!!"

dan aku yakin kalian tahu~~MEREKA BERANTEM~
dan saat itu masalah persahabatan yang telah terjalin selama 5 tahun pun terpecah belah~

Ricky:"Hei,hei,hei!!!masa cuma gara-gara cewek kalian brantem sih???"

Mereka bertiga pun masih bertengkar~

Hendra:"kalau begitu biar Cindy yang menentukan....~"
Willy dan Kevin:"Boleh"

Cindy:"ehm...Sorry ya guys gue udah ada pacar gitu loh~(sok berbahasa non-baku~)"

3 orang itu:"Tidakkkkkkkkkkkk......!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

Ricky:"sudah lah,sudah~"

mereka malah makin bertengkar dan saling memusuhi~

Ricky pun mempunyai ide bagus~
iya ingin mempertumakan mereka bertiga di satu tempat yang sama~

Ricky pun mengundang mereka untuk datang kerumah Ricky....
dan tiba2....

Willy:"apaan ini!!!!! saya tak terima masa saya belum tembak kalian udah tembak...?"
KEvin:"saya yang duluan tembak dia kaliikk..."
Hendra:"apa saya yang memberi bunganya terlebih dahulu~"
Ricky:"woi saya juga sudah menembaknya lebih dahulu tauk dan sekarang iya telah menjadi pacar kuw~"
Willy,Kevin,dan Hendra:"APA tidak mungkin~!!!!!!!"
Ricky:"sudah kubilang sudahlah sudah masa cuma gara-gara cewe ini kalian marah~?"
Willy:"sialan kamu ternyata kamu merebutnya dari ku~"
Hendra:"kita putus dari persahabatan ini~"
Kevin:"tak ada lagi persahabatan abadi kita lagi ok??"
Ricky:"tunggu, sebenarnya...."
bertiga:"ha??apa??apa??"
Ricky:"aku baru saja putus dengannya dari tadi pagi~karna bagi ku kalian yang utama~"
(sebenarnya Ricky Berbual~hehe)

mereka berempat pun makin akarab sejak itu........