Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DROP TABLE IF EXISTS no_dokumen;
- CREATE TABLE IF NOT EXISTS no_dokumen(
- nomor INT AUTO_INCREMENT,
- dokumen CHAR(1),
- PRIMARY KEY(dokumen,nomor)
- ) ENGINE=MyISAM;
- INSERT INTO no_dokumen(dokumen)
- VALUES('A'),('A'),('B'),('C'),('A'),('B'),('C'),('B'),('B');
- SELECT * FROM no_dokumen;
- +-------+---------+
- | nomor | dokumen |
- +-------+---------+
- | 1 | A |
- | 2 | A |
- | 3 | A |
- | 1 | B |
- | 2 | B |
- | 3 | B |
- | 4 | B |
- | 1 | C |
- | 2 | C |
- +-------+---------+
- INSERT INTO no_dokumen(dokumen)
- VALUES('A'),('B'),('A'),('C');
- +-------+---------+
- | nomor | dokumen |
- +-------+---------+
- | 1 | A |
- | 2 | A |
- | 3 | A |
- | 4 | A |
- | 5 | A |
- | 1 | B |
- | 2 | B |
- | 3 | B |
- | 4 | B |
- | 5 | B |
- | 1 | C |
- | 2 | C |
- | 3 | C |
- +-------+---------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement