BLOGGER TEMPLATES AND TWITTER BACKGROUNDS »

Jumat, 13 November 2009

Bab9 mYsql

mysql> insert into mahasiswa
-> values ('020013', 'hendriansah', 26, 164, 45, 1);
Query OK, 1 row affected (0.02 sec)

mysql> insert into mahasiswa
-> values ('020014', 'sardi sudrajat', 22, 158, 50, 0);
Query OK, 1 row affected (0.03 sec)

mysql> insert into mahasiswa
-> values ('020015', 'imam sugenjo', 23, 162, 50, 0);
Query OK, 1 row affected (0.03 sec)

mysql> insert into mahasiswa
-> values ('020016', 'bunafit nugroho', 25, 165, 50, 24);
Query OK, 1 row affected (0.03 sec)

mysql> select count(*) from mahasiswa;
+----------+
| count(*) |
+----------+
| 16 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) as rekaman from mahasiswa;
+---------+
| rekaman |
+---------+
| 16 |
+---------+
1 row in set (0.00 sec)

mysql> select count(nim) as rekaman from mahasiswa;
+---------+
| rekaman |
+---------+
| 16 |
+---------+
1 row in set (0.00 sec)

mysql> select sum(karya) as karya from mahasiswa;
+-------+
| karya |
+-------+
| 31 |
+-------+
1 row in set (0.00 sec)

mysql> select sum(umur) /16 as umurrata from mahasiswa;
+----------+
| umurrata |
+----------+
| 25.0000 |
+----------+
1 row in set (0.05 sec)

mysql> select sum(berat) /16 as beratrata from mahasiswa;
+-----------+
| beratrata |
+-----------+
| 44.0000 |
+-----------+
1 row in set (0.00 sec)

mysql> select sum(berat)/count (*) as beratrata from mahasiswa;
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 '*) as
beratrata from mahasiswa' at line 1
mysql> select sum(berat)/count(*) as beratrata from mahasiswa;
+-----------+
| beratrata |
+-----------+
| 44.0000 |
+-----------+
1 row in set (0.00 sec)

mysql> select avg(umur) as umurrata from mahasiswa;
+----------+
| umurrata |
+----------+
| 25.0000 |
+----------+
1 row in set (0.02 sec)

mysql> select avg(berat) as beratrata from mahasiswa;
+-----------+
| beratrata |
+-----------+
| 44.0000 |
+-----------+
1 row in set (0.00 sec)

mysql> select avg(tinggi) as tinggirata from mahasiswa;
+------------+
| tinggirata |
+------------+
| 160.3125 |
+------------+
1 row in set (0.00 sec)

mysql> select min(umur) as termuda from mahasiswa;
+---------+
| termuda |
+---------+
| 21 |
+---------+
1 row in set (0.00 sec)

mysql> select min(berat) as terkurus from mahasiswa;
+----------+
| terkurus |
+----------+
| 35 |
+----------+
1 row in set (0.00 sec)

mysql> select min(tinggi) as terpendek from mahasiswa;
+-----------+
| terpendek |
+-----------+
| 150 |
+-----------+
1 row in set (0.00 sec)

mysql> select max(umur) as tertua from mahasiswa;
+--------+
| tertua |
+--------+
| 28 |
+--------+
1 row in set (0.00 sec)

mysql> select max(tinggi) as tertinggi from mahasiswa;
+-----------+
| tertinggi |
+-----------+
| 170 |
+-----------+
1 row in set (0.00 sec)

mysql> select max(berat) as terberat from mahasiswa;
+----------+
| terberat |
+----------+
| 60 |
+----------+
1 row in set (0.00 sec)

mysql> select max(karya) as terbanyak from mahasiswa;
+-----------+
| terbanyak |
+-----------+
| 24 |
+-----------+
1 row in set (0.00 sec)

mysql> select min(berat) as minimal,
-> max(berat) as maksimal from mahasiswa;
+---------+----------+
| minimal | maksimal |
+---------+----------+
| 35 | 60 |
+---------+----------+
1 row in set (0.00 sec)

mysql> select min(tinggi) as minimal,
-> max(tinggi) as maksimal from mahasiswa;
+---------+----------+
| minimal | maksimal |
+---------+----------+
| 150 | 170 |
+---------+----------+
1 row in set (0.00 sec)

mysql> select min(umur) as minimal,
-> max(umur) as maksimal from mahasiswa;
+---------+----------+
| minimal | maksimal |
+---------+----------+
| 21 | 28 |
+---------+----------+
1 row in set (0.00 sec)

mysql> select min(karya) as minimal,
-> max(karya) as maksimal from mahasiswa;
+---------+----------+
| minimal | maksimal |
+---------+----------+
| 0 | 24 |
+---------+----------+
1 row in set (0.00 sec)

mysql> select nim,nama,umur from mahasiswa
-> where umur >= 22 and umur <= 25;
+--------+------------------+------+
| nim | nama | umur |
+--------+------------------+------+
| 020001 | indah indriyanna | 23 |
| 020003 | iis suwindri | 24 |
| 020005 | mawardi budiono | 25 |
| 020008 | sariyanto | 25 |
| 020012 | wagimin | 25 |
| 020014 | sardi sudrajat | 22 |
| 020015 | imam sugenjo | 23 |
| 020016 | bunafit nugroho | 25 |
+--------+------------------+------+
8 rows in set (0.03 sec)

mysql> select nim,nama,berat from mahasiswa
-> where berat >= 45 and berat <= 50;
+--------+------------------+-------+
| nim | nama | berat |
+--------+------------------+-------+
| 020001 | indah indriyanna | 45 |
| 020009 | bambang hermawan | 45 |
| 020012 | wagimin | 45 |
| 020013 | hendriansah | 45 |
| 020014 | sardi sudrajat | 50 |
| 020015 | imam sugenjo | 50 |
| 020016 | bunafit nugroho | 50 |
+--------+------------------+-------+
7 rows in set (0.00 sec)

mysql> select nim,nama,berat from mahasiswa
-> where not(berat >= 45 and berat <= 50);
+--------+------------------+-------+
| nim | nama | berat |
+--------+------------------+-------+
| 020002 | septi suhesti | 35 |
| 020003 | iis suwindri | 40 |
| 020004 | sugeng fitriyadi | 42 |
| 020005 | mawardi budiono | 43 |
| 020006 | arief saifullah | 60 |
| 020007 | juwanto | 40 |
| 020008 | sariyanto | 42 |
| 020010 | waldi lita | 37 |
| 020011 | sukerno | 35 |
+--------+------------------+-------+
9 rows in set (0.00 sec)

mysql> select nim,nama,umur from mahasiswa
-> where umur between 27 and 30;
+--------+------------------+------+
| nim | nama | umur |
+--------+------------------+------+
| 020006 | arief saifullah | 27 |
| 020007 | juwanto | 27 |
| 020009 | bambang hermawan | 27 |
| 020010 | waldi lita | 28 |
+--------+------------------+------+
4 rows in set (0.05 sec)

mysql> select nim,nama,berat from mahasiswa
-> where berat between 45 and 50;
+--------+------------------+-------+
| nim | nama | berat |
+--------+------------------+-------+
| 020001 | indah indriyanna | 45 |
| 020009 | bambang hermawan | 45 |
| 020012 | wagimin | 45 |
| 020013 | hendriansah | 45 |
| 020014 | sardi sudrajat | 50 |
| 020015 | imam sugenjo | 50 |
| 020016 | bunafit nugroho | 50 |
+--------+------------------+-------+
7 rows in set (0.00 sec)

mysql> select nim,nama,tinggi from mahasiswa
-> where tinggi between 160 and 170;
+--------+------------------+--------+
| nim | nama | tinggi |
+--------+------------------+--------+
| 020001 | indah indriyanna | 165 |
| 020002 | septi suhesti | 168 |
| 020003 | iis suwindri | 160 |
| 020004 | sugeng fitriyadi | 162 |
| 020006 | arief saifullah | 170 |
| 020008 | sariyanto | 160 |
| 020010 | waldi lita | 161 |
| 020013 | hendriansah | 164 |
| 020015 | imam sugenjo | 162 |
| 020016 | bunafit nugroho | 165 |
+--------+------------------+--------+
10 rows in set (0.00 sec)

mysql> select nim,nama,tinggi from mahasiswa
-> where not tinggi between 160 and 170;
+--------+------------------+--------+
| nim | nama | tinggi |
+--------+------------------+--------+
| 020005 | mawardi budiono | 155 |
| 020007 | juwanto | 155 |
| 020009 | bambang hermawan | 155 |
| 020011 | sukerno | 150 |
| 020012 | wagimin | 155 |
| 020014 | sardi sudrajat | 158 |
+--------+------------------+--------+
6 rows in set (0.00 sec)

mysql>

Rabu, 14 Oktober 2009

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, 07 September 2009

Cara Menginstal MySQL Server 5.0















Sabtu, 15 Agustus 2009

Tugas KKPI Ms.Power Point

Cara membuat file presentasi:

· Klik start.

· All program.

· Microsoft Office 2003.

· Microsoft Office Power Point 2003.

Cara mengubah Background:

  • Klik Format.
  • Pilih Background.
  • Klik segitiga full down.
  • Pilih Background yang anda inginkan.
  • Klik OK.
  • Klik Apply atau Apply to All.

Cara memberi efek dan animasi:

  • Klik Slide Show.
  • Pilih Custom Animation.
  • Klik Title atau Subtitle.
  • Lalu klik Add Effect.
  • Pilih Effect yang anda inginkan.
  • Klik OK.

Cara menyimpan file:

  • Klik File.
  • Pilih Save As / Ctrl+S atau klik icon disket.
  • Pilih lokasi penyimpanan.
  • Beri nama pada file name.
  • Klik Save.

Cara untuk menambah Slide:

  • Cara pertama:
  • Klik menu bar insert.
  • Pilih new slide.

  • Cara kedua:
  • Ctrl+M

  • Cara ketiga:
  • Tekan tombol enter pada area Outline.

Selasa, 04 Agustus 2009

jdi SlEb sEhaRi

aduch......tau gk????pas hRi sNin kmRen aQ+tmEn2 s'kLzQ jdi Sleb shRi lhOoo
ikh....pRasaanQ sNeng+dEg2an gTu dech......tKut bnYak yg sLah,tpi aLhmDuLiLah b'jLn dg Lncar
Smpai aCranY sLesAi..............
Duch,pkOny pas hri Snin tuh Jdi cMpr aduk we,nErVestlah,snenglah,akh pkony cmpR we

Kamis, 25 Juni 2009


Create your own at MyNiceSpace.com


Create your own at MyNiceSpace.com