To create a record into SQL Server database table, we use insert statement.
Assuming that we have MyDetails table whose structure is below.
Using SQL Script
INSERT INTO MyDetails (FullName, City) VALUES ('John Singh', 'New Delhi')
Execute the above query in the Query window by writing it into the Query Window and clicking on “! Execute” icon at the top-left. This will get one record inserted into the database. Here VALUES is the reserved keyword that is preceded by the column names to insert and appended with the value to insert into the respective columns.
Using SSMS (Sql Server Management Studio) menus
Right click the database table and select “Edit Top xxx Rows”
This brings the table in Edit mode, now write data for FullName and City column, do not try to write data into AutoId column as that is auto increment and is automatically filled by Sql Server.
Views: 6592 | Post Order: 29