39
loading...
This website collects cookies to deliver better user experience
DepartmentID
, Name
, GroupName
and ModifiedDate
columns respectively.design
. When we click on design
we will see all the column names, their data types and whether they allow NULL values or not.Column Properties
window. When we click on our different columns above, we see the column properties below change.Column Properties
window scroll down until we see Identity Specification. We expand this by clicking on the arrow on the left-side.Identity Increment
means the identity column increases by 1 every-time a new value is entered and the Identity Seed
means the starting value was 1.However we should double-check them to make absolutely certain.
insert into [Table-Name] (column-name/s)
values (values to insert into sql)
insert into [HumanResources].[Department] (Name, GroupName, ModifiedDate)
values ('Learning', 'Growth and Education', getdate())
Notice how the values in parenthesis, (column-names/s) and (values to insert into sql) need to correspond.
Name
corresponds to 'Learning'; GroupName
corresponds to 'Growth and Education' and ModifiedDate
corresponds to getdate().built-in
function provided by SMSS and allows us to get the current date.1 row affected
followed by the time that the query executed.Learn continually - there's always "one more thing" to learn.
-Steve Jobs