CSF5 : mySQL Create Table, Insert Into & Select...






CREATE TABLE namaTable ( 
   atribut_1 jenisData(saiz) PRIMARY KEY, 
   atribut_2 jenisData(saiz), 
   atribut_n jenisData(saiz) 
);

INSERT INTO namaJadual (atribut)
VALUES (nilai atribut);

SELECT atribut 
FROM namaJadual 
WHERE atribut='nilai atribut' 
GROUP BY 
ORDER BY atribut ASC/DESC; 

6 comments:

  1. .width 8 25 7 4 10
    .header on
    .mode column
    --membina jadual murid
    CREATE TABLE MURID (
    ID_Murid varchar(5) PRIMARY KEY,
    Nama_Murid varchar(255),
    Jantina varchar(1),
    Kaum varchar(1),
    Nama_Kelas varchar(2)
    );
    --memasukkan 1 rekod ke dalam jadual murid
    INSERT INTO
    MURID (ID_Murid, Nama_Murid, Jantina, Kaum, Nama_Kelas)
    VALUES ("SM108", "DEVI A/P MUTHU", "P", "I", "3E");

    --memasukkan 1 rekod ke dalam jadual murid
    INSERT INTO
    MURID (ID_Murid, Nama_Murid, Jantina, Kaum, Nama_Kelas)
    VALUES ("SM100", "SHARUL AIMAN BIN NAZRI", "L", "M", "3B");
    --memasukkan 1 rekod ke dalam jadual murid
    INSERT INTO
    MURID (ID_Murid, Nama_Murid, Jantina, Kaum, Nama_Kelas)
    VALUES ("SM108", "DEVI A/P MUTHU", "P", "I", "3E");
    --memilih untuk memaparkan semua rekod dalam jadual

    SELECT *
    FROM MURID;

    ReplyDelete
  2. Viably, the article is actually the best point on this library related issue. I fit in with your choices and will enthusiastically foresee your next updates.

    hrdf claimable training

    ReplyDelete
  3. Especially superb!!! Exactly when I search for this I found this webpage at the top of every single online diary in web crawler.
    360DigiTMG data analytics course

    ReplyDelete
  4. This is a great motivational article. In fact, I am happy with your good work. They publish very supportive data, really. Continue. Continue blogging. Hope you explore your next post

    data science training

    ReplyDelete
  5. I looked at some very important and to maintain the length of the strength you are looking for on your website
    data science course noida

    ReplyDelete
  6. Super site! I am Loving it!! Will restore again, Im taking your food moreover, Thanks.
    cyber security course in malaysia

    ReplyDelete

Komen

Note: Only a member of this blog may post a comment.