without running this what will be the values of the ID2 column after creating a default with values?
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions
Code:
create table def(id int ,id2 int)
INSERT def (id) VALUES(1)
INSERT def (id) VALUES(2)
INSERT def (id) VALUES(3)
SELECT * FROM def
ALTER TABLE def ADD CONSTRAINT
Dflt DEFAULT 500 FOR id2 WITH VALUES
INSERT def (id) VALUES(4)
[b]--what will be the values here[/b]
SELECT * FROM def
DROP TABLE def
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions