MSSQL Interview Questions and Answers
Question: How to create new table with "CREATE TABLE" statements?Answer: This is the second tutorial of a quick lesson on creating database objects with Transact-SQL statements. This section shows you how to create a database, create a table in the database, and then access and change the data in the table. Because this section is an introduction to using Transact-SQL, it does not use or describe the many options that are available for these statements. This SQL Guide assumes that you are running SQL Server Management Studio Express. To create a table, you must provide a name for the table, and the names and data types of each column in the table. It is also a good practice to indicate whether null values are allowed in each column.Most tables have a primary key, made up of one or more columns of the table. A primary key is always unique. The Database Engine will enforce the restriction that any primary key value cannot be repeated in the table. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Microsoft SQL Server?
- What is the simplest way to create a new database in MS SQL Server?
- How to delete a database in MS SQL Server?
- How to download and install Microsoft .NET Framework Version 2.0?
- How To Get a List of Columns using the "sp_help" Stored Procedure in MS SQL Server?