Select statements are used to retrieve data from SQL tables. The Select statement illustrated below retrieves all of the columns and rows from the named table.
Syntax:
Select *
from tablename;
from tablename;
Explanation:
- A Select statement is a SQL statement that begins with the word "select."
- Select statements are used to retrieve data from SQL tables.
- An asterisk after the word "select" means retrieve all fields (columns).
- The name of the table from which you are retrieving data is specified in the From clause.
- Use a semicolon to signify the end of a SQL statement.
- In the SQL text box, type:
Select *
from TrnVendor;
from TrnVendor;
- Execute the command by clicking on First, the Run button located to the right of the SQL text box. The results will display on the screen.
- Use the horizontal scroll bar to move across the screen. The fields in the Vendor table will display alphabetically. Use the vertical scroll bar to move up and down the screen.
- Click on Stop to return to the original screen.
VendId | Name | Add1 | City | State | CurrBal | ExpAcct | |
TV001 | Wet Off Towels | 66 Keep Dry Way | Toledo | OH | 1.31300E+001 | 7230 | |
TV002 | The Games All Here | 85 Olympic Drive | Warren | NY | 4.53170E+002 | 4110 | |
TV003 | BedMakers Linen | 97 Comfort Zone | Chicago | IL | 5.00000E+002 | 4120 | |
TV004 | Bed Room Furniture, Inc. | 4 Hide A Way | Mercer | NJ | 3.21700E+002 | 6080 | |
TV005 | Ray Block | 90 Sunscreen Blvd. | Detroit | MI | 1.00123E+003 | 7230 |
No comments:
Post a Comment