Answers

Question and Answer:

  Home  MS SQL Server

⟩ How To Add More Data to the Testing Table in MS SQL Server?

If you want to continue with other tutorial exercises in this FAQ collection, you need to add more data to the testing table. Follow the script below to add a new column and more rows:

ALTER TABLE ggl_links ADD tag VARCHAR(8)

GO

UPDATE ggl_links SET tag = 'DEV' WHERE id = 101

GO

UPDATE ggl_links SET tag = 'DBA' WHERE id = 102

GO

UPDATE ggl_links SET tag = 'SQA' WHERE id = 103

GO

INSERT INTO ggl_links VALUES (104,

'www.mysql.com', '', '0', '2006-01-01', 'DBA')

GO

INSERT INTO ggl_links VALUES (105,

'www.oracle.com', '', '0', '2005-01-01', 'DBA')

GO

INSERT INTO ggl_links VALUES (106,

'www.php.net', '', '0', '2004-01-01', 'DEV')

GO

INSERT INTO ggl_links VALUES (107,

'www.winrunner.com', '', '0', '2003-01-01', 'SQA')

GO

UPDATE ggl_links

SET counts = CAST(LOG(id)*1000000 AS INT) % 1000

GO

 155 views

More Questions for you: