It's time to run your first T-SQL query! As you remember, the data in a database is stored in tables.
You can retrieve all data from the
User table with this query:
SELECT tells your database that you want to select data.
FROM User tells the database to select data from the
Finally, the asterisk (
*) tells the database that you want to get all columns from this table.
In SQL Server, you should always end your statement with a semicolon (
GO. A semicolon or
GO at the end of a query is like a period at the end of a sentence – it tells SQL Server that you're done with your command. However, there is a slight difference between a semicolon and
GO, but that is beyond the scope of this course.
Our platform accepts both a semicolon and
GO at a end of the statement. However, it also accepts your query submissions without them, so you can leave them out completely.