SQL is a language that is used by databases to hold a lot of different types of information. To understand what T-SQL is you must first understand what the letters stand for in SQL. SQL Stands for structured Query Language. The T in front of TSQL simply stands for structured. SQL is not a language that was popular at its inception, it grew in popularity althought it was not like the other types
. of languages databses were using. To begin writing T-SQL one must know how to create a database. First, open a query window. In the query window type 'CREATE DATABASE' TestData GO. This command should then be executed by pressing F5. When the keyword 'GO' is used it seperates statements when the amount of statements is greater than one. Now that the database has been created, a table must be created so that information may be inserted into it. Creating a table begins with ensuring that the table has a name and whether or not the table will contain null values or not. Open query editor and enter the following to create a table, "USE master; GO --Delete the TestData database if it exists. IF EXISTS(SELECT * from sys.databases WHERE name='DatabaseName here') BEGIN DROP DATABASE DatabaseNameHere; END --Create a new database called DatabaseNameHere. CREATE DATABASE DatabaseNameHere;" Once this information has been entered press F5 to execute the command. For different forms of Data there should be different names. Repeat the process for however many different categories the data might have. Now that the table has been created the rested is fairly simple, the data is now inserted into the table. The basic syntax for entering data is as follows "-- Standard syntax INSERT dbo.Products (ProductID, ProductName, Price, ProductDescription) VALUES (1, 'Door', 12.48, 'Closet door') GO" Follow whatever the data might be on and enter the data making sure that their are no errors. Each different data item should have its own separate column and if their are prices or other information that requires columns, make sure to create them. Aside from just creating databases, it is important to know how to delete them as well. If data needs to be deleted firstly it must be in the right database. From there a command known as the REVOKE statement is to be used. It is as follows " REVOKE EXECUTE ON pr_Names FROM Mary; GO" Then use the 'DROP' command to select all of the necessary tables. Then the delete command is used. " DELETE FROM Products; GO" http://msdn.microsoft.com/en-us/library/ms365336.aspx or http://www.java2s.com/Tutorial/SQLServer/CatalogSQLServer.htm