Professional Documents
Culture Documents
254 -u xi2 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 566
Server version: 5.0.51a-24+lenny2 (Debian)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use xi2;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> create table Ajeng_23(no_ind int(5) primary key auto_increment, nama varchar(50), gender
varchar(9), tgl_lahir date);
Query OK, 0 rows affected (0.00 sec)
mysql> describe Ajeng_23;
+-----------+--------------+-------+------+----------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+-------+------+----------+-------------------+
| no_ind | int(5) | NO | PRI | NULL | auto_increment |
| nama | varchar(50) | YES | | NULL | |
| gender | varchar(9) | YES | | NULL | |
| tgl_lahir | date | YES | | NULL | |
+-----------+--------------+-------+-----+-----------+-------------------+
4 rows in set (0.01 sec)
mysql> insert into Ajeng_23(no_ind,nama,gender,tgl_lahir)
-> values('21112','Ajeng','perempuan','1994-05-07');
Query OK, 1 row affected (0.00 sec)
mysql> select*from Ajeng_23;
+---------+-------+--------------+---------------+
| no_ind | nama | gender | tgl_lahir |
+---------+-------+--------------+---------------+
| 21112 | Ajeng | perempuan | 1994-05-07 |
+--------+--------+--------------+---------------+
1 row in set (0.00 sec)
mysql> insert into Ajeng_23(no_ind,nama,gender,tgl_lahir)
-> values('21000','Poeyoe','perempuan','1993-09-28');
Query OK, 1 row affected (0.00 sec)
mysql> select*from Ajeng_23;
+--------+-----------+--------------+---------------+
| no_ind | nama | gender | tgl_lahir |
+--------+-----------+--------------+---------------+
| 21112 | Ajeng | perempuan | 1994-05-07 |
| 21000 | Poeyoe | perempuan | 1993-09-28 |
+--------+-----------+--------------+---------------+
2 rows in set (0.00 sec)
mysql> delete from Ajeng_23 where nama='Ajeng';
Query OK, 1 row affected (0.00 sec)
mysql> select*from Ajeng_23;
+--------+----------+--------------+---------------+
| no_ind | nama | gender | tgl_lahir |
+--------+----------+--------------+---------------+
| 21000 | Poeyoe | perempuan | 1993-09-28 |
+--------+----------+--------------+---------------+
1 row in set (0.00 sec)
mysql>