Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

MSSQL%20Interview%20Questions%20and%20Answers

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:

©2024 WithoutBook