[P1]
mysql> describe utilisateurs;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| ID           | int(10) unsigned |      | PRI | NULL    | auto_increment |
| UserFullName | char(45)         |      |     |         |                |
+--------------+------------------+------+-----+---------+----------------+
2 rows in set (0.01 sec)
[P2]
mysql> describe utilisateurs;
+---------------+------------------+------+-----+---------+----------------
+
| Field         | Type             | Null | Key | Default | Extra
|
+---------------+------------------+------+-----+---------+----------------
+
| ID            | int(10) unsigned |      | PRI | NULL    | auto_increment
|
| UserFullName  | varchar(45)      |      |     |         |
|
| UserLoginName | varchar(25)      |      |     |         |
|
| UserPassword  | varchar(25)      |      |     |         |
|
| UserPhone     | varchar(25)      |      |     |         |
|
| UserAdress    | text             |      |     |         |
|
+---------------+------------------+------+-----+---------+----------------
+
6 rows in set (0.00 sec)
[P3]
mysql> describe utilisateurs;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| ID           | int(10) unsigned |      | PRI | NULL    | auto_increment |
| UserFullName | char(45)         |      |     |         |                |
+--------------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
[P4]
mysql> describe utilisateurs;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| ID           | int(10) unsigned |      | PRI | NULL    | auto_increment |
| UserFullName | varchar(45)      |      |     |         |                |
+--------------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
[P5]
mysql> alter table utilisateurs modify column UserFullName char(45);
Query OK, 0 rows affected (0.16 sec)
Records: 0  Duplicates: 0  Warnings: 0
mysql> describe utilisateurs;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| ID           | int(10) unsigned |      | PRI | NULL    | auto_increment |
| UserFullName | varchar(45)      | YES  |     | NULL    |                |
+--------------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
[P6]
mysql> alter table utilisateurs modify column UserFullName char(65);
Query OK, 0 rows affected (0.17 sec)
Records: 0  Duplicates: 0  Warnings: 0
[P7]
mysql> describe utilisateurs;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| ID           | int(10) unsigned |      | PRI | NULL    | auto_increment |
| UserFullName | varchar(65)      | YES  |     | NULL    |                |
+--------------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
mysql>
			
		
 
	
Partager