Now that you have the basics of SQL, I think it’s time to learn something a bit more involved. If you need to accomplish a task within SQL you will run a series of T-SQL statements. If you want to run those same steps over and over again, you could save them to a file,…
Month: April 2006
SQL101-Homework Assignment #6 Answer Key
Here are the answers for homework #6. Let me know if you have any questions! USE AdventureWorks GO 1. How many rows are there in Sales.SalesOrderHeader? SELECT COUNT(*) FROM Sales.SalesOrderHeader 2. How many Rows are there in Sales.SalesOrderDetail, that are also in Sales.SalesOrderHeader (SalesOrderID is the common/shared column)? SELECT COUNT(*) FROM Sales.SalesOrderDetail sod INNER JOIN…
SQL101-Homework Assignment #6
We’re starting to cover some more difficult subjects in these homework problems. Please let me know if you need any help! 1. How many rows are there in Sales.SalesOrderHeader? 2. How many Rows are there in Sales.SalesOrderDetail, that are also in Sales.SalesOrderHeader (SalesOrderID is the common/shared column)? 3. How many sales orders (sales.salesOrderHeader) were made…
SQL 201 – CREATE TABLE
CREATE TABLE I’ve showed you how to get data out of a table, put data in, change it, and delete it. But I haven’t showed you how to create your own table….until now. CREATE TABLE tableName ( columnName <datatype> ) This statement is pretty straightforward, you have to choose the name of the table, and…