Tags

,

DESCRIBE

Mysql

>DESCRIBE users;
+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra     |
+----------+--------------+------+-----+---------+----------------+
| id.........| int(11)      | NO   | PRI | NULL    | auto_increment |
| hash_id....| varchar(60)  | NO   |     |         |                |
| name.......| varchar(100) | NO   |     |         |                |
| username...| varchar(50)  | NO   |     |         |                |
| password...| varchar(50)  | NO   |     |         |                |
| email......| varchar(100) | NO   |     |         |                |
| rank_id....| int(11)      | NO   |     | 0       |                |
+----------+--------------+------+-----+---------+----------------+

MongoDB

>Object.keys(db.users.findOne())
[ '_id', 'username', 'email', 'hashed_password' ]

SHOW TABLES

Mysql

>SHOW TABLES;
+-----------------------------+
| Tables_in_overtime_tracking |
+-----------------------------+
| overtime_status             |
| overtimes                   |
| projects                    |
| ranks                       |
| users                       |
+-----------------------------+
5 rows in set (0.00 sec)

MongoDB

>show collections
sessions
system.indexes
users


SELECT *

Mysql

>SELECT * FROM users;
...

MongoDB

>db.users.find() // if no record it simply return NONE
>
Advertisements