Saturday, July 2, 2011

View Content of Table

In this section, I'll tells how to view content of table based alphabetical, gender, city, etc. To view all content of table we can use sintax "SELECT" , for example :

mysql > select* from siswa;

from image we can view all of the table, but if we want to view just a NIS, address and birth of student we can use sintax SELECT too, but there are additional, this is sintax :


mysql>Select NIS, alamat, tgl_lahir from siswa;

and the result from the sintax is :

Now, we displays name of student based of alphabetical, with use sintax Order By on Select, Ok we trying now :

mysql > select * from siswa 
      > order by nama_siswa;
and result from sintax is :

view content of table can we can show our suit for example like images above, this is sintax for view table from variety of way :
1. NIS 
    mysql> select * from siswa 
       > order by nis;
2. Nama_siswa
    mysql > select* from siswa
      > order by nama_siswa;
3. Alamat
    mysql > select* from siswa
        > order by alamat;
4.J_kel
  mysql > select* from siswa
        > order by j_kel;
5.tempat_lahir
  mysql > select* from siswa
        > order by tempat_lahir;
6.tgl_lahir
  mysql > select* from siswa
        > order by tgl_lahir;
7.order name descending
  mysql > select* from siswa
        > order by nama_siswa(desc);


* Thanks to Allah SWT yang telah melimpahakan rahmatnya sehingga saya bisa membagi tulisan acak - acakan disini.
*Thanks to Orang tua saya yang telah mengajari saya arti kemandirian dan mengajari saya semua arti hidup saya.
*Thanks To Om n Tante yang telah memberikan saya sarana.








0 komentar:

Post a Comment

NgomeL aja disini..!!