Collections:
Testing Table for DML Statements in SQL Server
How To Create a Testing Table with Test Data in SQL Server?
✍: FYIcenter.com
If you want to practice DML statements, like INSERT, UPDATE and DELETE statements, you should create a testing table. The tutorial exercise shows you a good example:
CREATE TABLE fyi_links (id INTEGER PRIMARY KEY,
url VARCHAR(80) NOT NULL,
notes VARCHAR(1024),
counts INT,
created DATETIME NOT NULL DEFAULT(getdate()))
GO
SELECT c.column_id as seq, c.name, x.name as type,
c.max_length, c.is_nullable
FROM sys.columns c, sys.tables t, sys.systypes x
WHERE c.object_id = t.object_id
AND c.system_type_id = x.xtype
AND t.name = 'fyi_links'
ORDER BY c.column_id
GO
seq name type max_length is_nullable
1 id int 4 0
2 url varchar 80 0
3 notes varchar 1024 1
4 counts int 4 1
5 created datetime 8 0
You should keep this table to practice other tutorial exercises presented in this collection.
⇒ "INSERT INTO" - Inserting a New Row into a Table in SQL Server
⇐ DML (Data Manipulation Language_Statements in SQL Server
2016-11-03, 2409🔥, 0💬
Popular Posts:
How To List All User Names in a Database in SQL Server? If you want to see a list of all user names ...
How To Convert Binary Strings into Hexadecimal Character Strings in SQL Server? When a query returns...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...
What Happens If the Imported Table Already Exists in Oracle? If the import process tries to import a...
How To Look at the Current SQL*Plus System Settings in Oracle? If you want to see the current values...