# Sample commands

testdatabase 'testsietske';

```
> mysql -u root

MariaDB [testsietske]> use testsietske;

MariaDB [testsietske]> show tables;

MariaDB [testsietske]> select * from City;

MariaDB [testsietske]> select * from City where Countrycode = "NLD";

MariaDB [testsietske]> select * from City where District = "Noord-Holland";

MariaDB [testsietske]> select * from City where Countrycode = "NLD" and  population > "100000";


MariaDB [testsietske]> show tables;

MariaDB [testsietske]> select * from Country where Continent = "Europe";

----
```

- You can use db\_name.tbl\_name as an alternative to the tbl\_name FROM db\_name syntax. In other words, these two statements are equivalent:

```
 SHOW COLUMNS FROM City;
 MariaDB [testsietske]> SHOW COLUMNS FROM mytable FROM mydb;
 MariaDB [testsietske]> SHOW COLUMNS FROM mydb.mytable;
```

- show only first 10 results

```
 MariaDB [testsietske]> select * from City limit 10;
```

- show result 10 to 30

```
 MariaDB [testsietske]> select * from City limit 20 offset 10;
```