The sql Command
The sql command starts the database client.
Here is an example:
> sql b.com
b.com is the hostname of the database server to connect to.
The following is an example LWOS state after LWOS parses Shell -> User Input:
- Hostname: "client.com"
- Tokens: [ "b.com", [ ] ],
- Command: "sql",
- Shell
- Pressed Key: "Enter"
- User Input: "",
- Buffer: "> sql b.com "
- Status: "WAITING_FOR_COMMAND"
The sql command saves the server hostname in Command Context -> Hostname and prints the SQL prompt as follows:
sql>
This is a special mode in the shell where you can type SQL commands such as SELECT or INSERT. You cannot use regular shell commands such as ls or mkdir while you are in the SQL shell mode. You can exit the SQL shell mode by entering exit and pressing the Enter key.
Try running the sql command in TERMINAL_A (start serve_db in TERMINAL_B first):
Please write the command that connects to a database server at lwdb.intermart.com
The sql command saves the server hostname in Command Context -> ___________
Comments
Please log in to add comments