Using encode function with insert statement : Insert : Insert Update Delete MySQL TUTORIALS


MySQL TUTORIALS » Insert Update Delete » Insert »

 

Using encode function with insert statement


mysql>
mysql>
mysql> CREATE TABLE UserAccounts
    -> (
    ->    UserID SMALLINT NOT NULL PRIMARY KEY,
    ->    Password VARCHAR(20NOT NULL
    -> );
Query OK, rows affected (0.02 sec)

mysql>
mysql>
mysql> INSERT INTO UserAccounts VALUES (101, ENCODE('pw101', 'key101'));
Query OK, row affected (0.00 sec)

mysql>
mysql> select from UserAccounts;
+--------+----------+
| UserID | Password |
+--------+----------+
|    101 | ?*       |
+--------+----------+
row in set (0.00 sec)

mysql>
mysql>
mysql> drop table UserAccounts;
Query OK, rows affected (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Insert Update Delete
» Insert