← Back to SELECT Basics
Question 26
Department Codes and Buildings
Department Codes and Buildings
Return three columns for every department:code,nameandbuilding. There is nothing to filter or sort; the exercise is choosing columns rather than asking for all of them.
Expected result:
+------+------------------+----------------+ | code | name | building | +------+------------------+----------------+ | CS | Computer Science | Turing Hall | | MATH | Mathematics | Gauss Building | | ENG | English | Austen House | | BIO | Biology | Darwin Centre | | BUS | Business | Keynes Tower | | ART | Fine Arts | Kahlo Studio | +------+------------------+----------------+ 6 rows
Hints2 available
Sign in to use hintsTopics:
SELECT Basics
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)
Results
Run your SQL to see every statement's output here, then how it compares with the expected answer.
Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns — or open the database browser on the left.