Created
March 1, 2011 20:24
-
-
Save edsu/849824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ed@li144-162:~$ mysql -u root -p | |
| Enter password: | |
| Welcome to the MySQL monitor. Commands end with ; or \g. | |
| Your MySQL connection id is 52868 | |
| Server version: 5.1.41-3ubuntu12.9-log (Ubuntu) | |
| Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. | |
| mysql> create database test; | |
| Query OK, 1 row affected (0.30 sec) | |
| mysql> use test; | |
| Database changed | |
| mysql> create table foo (id int primary key, created datetime null); | |
| Query OK, 0 rows affected (0.00 sec) | |
| mysql> insert into foo (id, created) values (2, now()); | |
| Query OK, 1 row affected (0.00 sec) | |
| mysql> insert into foo (id) values (3); | |
| Query OK, 1 row affected (0.00 sec) | |
| mysql> select * from foo; | |
| +----+---------------------+ | |
| | id | created | | |
| +----+---------------------+ | |
| | 1 | 2011-03-01 20:22:22 | | |
| | 2 | 2011-03-01 20:22:27 | | |
| | 3 | NULL | | |
| +----+---------------------+ | |
| 3 rows in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment