Science, Tech, Math › Computer Science Create a Table with SQL Server 2019 Use SQL Server Management Studio to create tables visually Share Flipboard Email Print Lifewire Science, Tech, Math PHP Programming Perl Python Java Programming Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Mike Chapple Mike Chapple Writer University of Idaho Auburn University Notre Dame Mike Chapple is an IT professional with more than 10 years' experience cybersecurity and extensive knowledge of SQL and database management. Learn about our Editorial Process Updated on February 14, 2020 Microsoft's SQL Server supports several different methods for creating new tables within a database. Many database developers prefer to manually script the SQL statements that create such objects, but the easier method relies on the GUI tools within SQL Server Management Studio. The procedures outlined below govern Microsoft SQL Server Management Studio 2019, although procedures are similar for versions going back to 2012. How to Create a Table Using SSMS To create a table using the new-table wizard: From SMSS, within the Object Explorer, expand the tree for the relevant database. From the Tables node, right-click it and select New > Table. Lifewire From the New Table screen, enter the grid of information: Column Name: Offer a unique name for the field. Data Type: Select from the drop-down list the type of information that the field contains. Review documentation from Microsoft for a complete walk-through of these options. Allow Nulls: Check this column if the column may remain null. As you complete each column in the list, modify the detail properties in the pane in the lower half of the window. In general, the most common properties you'll modify are the length (the maximum allowable size of the field) and a description (a plain-English definition of the field's intended purpose). Use the Table Designer menu, or right-click on a specific column in the table designer, to further refine the table. Common options from the menu include: Set Primary Key: Toggles whether the column constitutes a unique key value for the table.Insert Column: Add a new column to the table.Delete Column: Remove a column from the table.Relationships: Establishes a foreign-key relationship to a different table.Indexes/Keys: Sets unique properties or an index for the column.Check Constraints: Sets rules governing acceptable values for the field. If the value doesn't fall within the constraints, the record won't save. Press Ctrl+S to save the table. You'll be prompted to offer a name for the table. Creating Tables Using T-SQL Microsoft's T-SQL supports data definition language capability to create, delete, or modify objects. If you're not deeply familiar with SQL, stick with the visual editor in SSMS. Create Table (T-SQL) Cite this Article Format mla apa chicago Your Citation Chapple, Mike. "Create a Table with SQL Server 2019." ThoughtCo, Apr. 5, 2023, thoughtco.com/creating-tables-with-sql-server-2012-1019792. Chapple, Mike. (2023, April 5). Create a Table with SQL Server 2019. Retrieved from https://www.thoughtco.com/creating-tables-with-sql-server-2012-1019792 Chapple, Mike. "Create a Table with SQL Server 2019." ThoughtCo. https://www.thoughtco.com/creating-tables-with-sql-server-2012-1019792 (accessed June 5, 2023). copy citation