![]() Now our table has been created, in the next step we are gonna add some data in the table.Now click on Save button to save the table and it will ask for the table name.Now quickly fill the other columns name as shown in below figure, you can choose any data type you want but I have choosen varchar(50).I have done this to make it auto incremented, now as you add the data in it the ContactID will be incremented on its own showning you the total number of data present in the Table.After that go in the properties of table and click on Identity Specification to expand it.Now click on the Primary Key as shown in below figure. ![]() I have given the first Column as ColumnID and Data Type is int and unmark the Allow Nulls Option.Now, it will open a Table where we will add the Columns Name of our Table.Now in the Server Explorer, right click on the Tables and then Add New Table.Double clicking the database will open up Server Explorer.Now, double click on the database which we just created in the step 2 and named it Contacts.mdf.Now our database has been created which you can also see in the solution explorer but rite now its empty, so now in the next step we are gonna add a table in our database.Just cancel it for now as we don't have anything right now to add in our database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |