Ability to expand columns when typing UPDATE statements (similar to INSERT)
- Let's assume we have a table:
CREATE TABLE dbo.Employee
(
EmployeeID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
IsMainWorkPlace BIT NOT NULL,
TabelNumber VARCHAR(6) NULL,
PersonID INT NOT NULL,
DepartmentUID UNIQUEIDENTIFIER NOT NULL,
DateIn DATETIME NOT NULL,
DateOut DATETIME NULL,
IsLabourUnionMember BIT NOT NULL,
FiringReasonID INT NULL
)
- Let's type the following construction and click TAB at the end:
UPDATE dbo.Employee
- Suggest to expand columns just like it's implemented for INSERT:
UPDATE dbo.Employee
SET
IsMainWorkPlace = DEFAULT /* IsMainWorkPlace - BIT NOT NULL /
, TabelNumber = '' / TabelNumber - VARCHAR(6) /
, PersonID = 0 / PersonID - INT NOT NULL /
, DepartmentUID = NULL / DepartmentUID - UNIQUEIDENTIFIER NOT NULL /
, DateIn = GETDATE() / 'YYYY-MM-DD hh:mm:ss[.nnn]' DateIn - DATETIME NOT NULL /
, DateOut = GETDATE() / 'YYYY-MM-DD hh:mm:ss[.nnn]' DateOut - DATETIME /
, IsLabourUnionMember = DEFAULT / IsLabourUnionMember - BIT NOT NULL /
, FiringReasonID = 0 / FiringReasonID - INT */
WHERE EmployeeID = 0
I was missing this feature when writing triggers for views.
Meet the feature in SQL Complete v5.0!
-
nitths commented
This could be very helpful for INSERT statements