Here is a list of basic T-SQL commands that you should know in order to work with the queries in Management Studio. You can find them in the web very quickly using a search engine, but I chose to list some here just in case and for my personal reference:
execute the query on a database
Simple query example structure for basic operations:
select "values" from "table"
select row results from a table, make a query
use * to get all values
order results, by default the order is of finding.
you can force desc - descending
asc - ascending
select ExtracData from stg.ExtractLog where DataSource = 'HRData'
order by 'Size'
backup database "DataBaseName"
to disk = '"path"'
generates a backup off a specific database to disk location
commonly used with “SQL Server Agent” activated
dbcc showcontig ('"TableName"')
shows information about paging tables, number off reads, accesses, etc
good for optimization analisys
extra paramater (optional) that shows result as a table