T-SQL statements can be written and submitted to the Database Engine in the following ways.
- By using SQL Server Management Studio
- By using the sqlcmd utility
- By connecting form an application that you create
You can use the following query to create the database.
Switch the query Editor connection to the TestDatabase database.
For the you can use following query.
USE TestDatabase
GO
Create a table
You can use following query to create a simple table named Products. The Products table consists of 4 columns. The ProductID column is the primary key of the table. This query contains an optional element (dbo.) called a schema. The schema is the database object that owns the table. If you are an administrator , dbo is the default schema. dbo stands for database owner.
No comments:
Post a Comment