Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 75 Server version: 11.8.3-MariaDB-0+deb13u1 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show tables; ERROR 1046 (3D000): No database selected MariaDB [(none)]> use sks; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [sks]> show tables; +---------------+ | Tables_in_sks | +---------------+ | advisor | | classroom | | course | | department | | instructor | | prereq | | section | | student | | takes | | teaches | | time_slot | +---------------+ 11 rows in set (0.001 sec) MariaDB [sks]> describe instructor; +-----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | ID | varchar(5) | NO | PRI | NULL | | | name | varchar(20) | NO | | NULL | | | dept_name | varchar(20) | YES | MUL | NULL | | | salary | decimal(8,2) | YES | | NULL | | +-----------+--------------+------+-----+---------+-------+ 4 rows in set (0.004 sec) MariaDB [sks]> select name,id from instructor; +------------+-------+ | name | id | +------------+-------+ | Srinivasan | 10101 | | Wu | 12121 | | Mozart | 15151 | | Einstein | 22222 | | El Said | 32343 | | Gold | 33456 | | Katz | 45565 | | Califieri | 58583 | | Singh | 76543 | | Crick | 76766 | | Brandt | 83821 | | Kim | 98345 | +------------+-------+ 12 rows in set (0.001 sec) MariaDB [sks]> select id,name from instructor; +-------+------------+ | id | name | +-------+------------+ | 10101 | Srinivasan | | 12121 | Wu | | 15151 | Mozart | | 22222 | Einstein | | 32343 | El Said | | 33456 | Gold | | 45565 | Katz | | 58583 | Califieri | | 76543 | Singh | | 76766 | Crick | | 83821 | Brandt | | 98345 | Kim | +-------+------------+ 12 rows in set (0.001 sec) MariaDB [sks]> select id,name,dept_name,salary from instructor; +-------+------------+------------+----------+ | id | name | dept_name | salary | +-------+------------+------------+----------+ | 10101 | Srinivasan | Comp. Sci. | 65000.00 | | 12121 | Wu | Finance | 90000.00 | | 15151 | Mozart | Music | 40000.00 | | 22222 | Einstein | Physics | 95000.00 | | 32343 | El Said | History | 60000.00 | | 33456 | Gold | Physics | 87000.00 | | 45565 | Katz | Comp. Sci. | 75000.00 | | 58583 | Califieri | History | 62000.00 | | 76543 | Singh | Finance | 80000.00 | | 76766 | Crick | Biology | 72000.00 | | 83821 | Brandt | Comp. Sci. | 92000.00 | | 98345 | Kim | Elec. Eng. | 80000.00 | +-------+------------+------------+----------+ 12 rows in set (0.001 sec) MariaDB [sks]> select * from instructor; +-------+------------+------------+----------+ | ID | name | dept_name | salary | +-------+------------+------------+----------+ | 10101 | Srinivasan | Comp. Sci. | 65000.00 | | 12121 | Wu | Finance | 90000.00 | | 15151 | Mozart | Music | 40000.00 | | 22222 | Einstein | Physics | 95000.00 | | 32343 | El Said | History | 60000.00 | | 33456 | Gold | Physics | 87000.00 | | 45565 | Katz | Comp. Sci. | 75000.00 | | 58583 | Califieri | History | 62000.00 | | 76543 | Singh | Finance | 80000.00 | | 76766 | Crick | Biology | 72000.00 | | 83821 | Brandt | Comp. Sci. | 92000.00 | | 98345 | Kim | Elec. Eng. | 80000.00 | +-------+------------+------------+----------+ 12 rows in set (0.001 sec) MariaDB [sks]> select dept_name from instructor; +------------+ | dept_name | +------------+ | Biology | | Comp. Sci. | | Comp. Sci. | | Comp. Sci. | | Elec. Eng. | | Finance | | Finance | | History | | History | | Music | | Physics | | Physics | +------------+ 12 rows in set (0.001 sec) MariaDB [sks]> select name from instructor; +------------+ | name | +------------+ | Srinivasan | | Wu | | Mozart | | Einstein | | El Said | | Gold | | Katz | | Califieri | | Singh | | Crick | | Brandt | | Kim | +------------+ 12 rows in set (0.001 sec) MariaDB [sks]> create index nameidx on instructor(name); Query OK, 0 rows affected (0.010 sec) Records: 0 Duplicates: 0 Warnings: 0 MariaDB [sks]> select name from instructor; +------------+ | name | +------------+ | Brandt | | Califieri | | Crick | | Einstein | | El Said | | Gold | | Katz | | Kim | | Mozart | | Singh | | Srinivasan | | Wu | +------------+ 12 rows in set (0.001 sec) MariaDB [sks]>