SQL within 1and1 databases – basic commands

Access the database within 1and1 using Putty and SSH – this is the easy part, and I’m into SQL Monitor where the prompt is: mysql>

Note: 1and1 is using Oracle, which is convenient for learning and I can create a bunch of different databases.

Q: How to know the names of the tables within the database?
A: show tables from ;
A: Below:
mysql> show tables from db610639204;

+————————-+
| Tables_in_db610639204 |
+————————-+
| accessprofile |
| accessright |
| accessscope |
| action |
| activity |
| activityprice |
| affectation |
| alert |
| approver |
| assignment |
| attachment |
| audit |
| auditsummary |
| bill |
| billline |
| calendar |
| calendardefinition |
| checklist |
| checklistable |
| checklistdefinition |
| checklistdefinitionline |
| checklistline |
| client |
| collapsed |
| columnselector |
| command |
| context |
| contexttype |
| copyable |
| criticality |
| decision |
| delay |
| delayunit |
| deliverymode |
| dependable |
| dependency |
| document |
| documentdirectory |
| documentversion |
| efficiency |
| event |
| expense |
| expensedetail |
| expensedetailtype |
| favorite |
| favoriteparameter |
| feasibility |
| filter |
| filtercriteria |
| habilitation |
| habilitationother |
| habilitationreport |
| health |
| history |
| importable |
| importlog |
| indicator |
| indicatorable |
| indicatorableindicator |
| indicatordefinition |
| indicatorvalue |
| issue |
| likelihood |
| link |
| linkable |
| list |
| mail |
| mailable |
| measureunit |
| meeting |
| menu |
| menuselector |
| message |
| milestone |
| mutex |
| note |
| opportunity |
| origin |
| originable |
| otherversion |
| overallprogress |
| parameter |
| payment |
| paymentdelay |
| paymentmode |
| periodicity |
| periodicmeeting |
| plannedwork |
| planningelement |
| planningmode |
| plugin |
| predefinedtext |
| priority |
| privacy |
| product |
| profile |
| project |
| projecthistory |
| quality |
| question |
| quotation |
| recipient |
| referencable |
| report |
| reportcategory |
| reportparameter |
| requirement |
| resource |
| resourcecost |
| risk |
| risklevel |
| role |
| runstatus |
| severity |
| sla |
| status |
| statusmail |
| team |
| tempupdate |
| term |
| testcase |
| testcaserun |
| testsession |
| textable |
| ticket |
| today |
| todayparameter |
| trend |
| type |
| urgency |
| version |
| versionproject |
| visibilityscope |
| work |
| workelement |
| workflow |
| workflowstatus |
| workperiod |
+————————-+
138 rows in set (0.15 sec)

Note: This is the Projeqtor database, which is quite commprehensive

Q: How to know the fields within a table? In this case, the table is called “Client”
A: show columns from client;
A: This comes back with information within each of these colunns, at the field level:
Field | Type | Null | Key | Default | Extra

About Paul

CERT Coordinator, Ham Radio Operator, GTD Fan; Photographer; Domino/Notes Administrator
This entry was posted in SQL. Bookmark the permalink.