Here is the command!
TRUNCATE TABLE mytable
Here is the command!
TRUNCATE TABLE mytable
Here is how to enable remote SQL connections for Server 2008:
Open up SQL Server Configuration Manager
Click on SQL Server Network Configuration
--Enable Named Pipes
--Enable TCP/IP
Protocols for SQLEXPRESS (OR YOUR INSTANCE)
-Double click on TCP/IP
Find the IP addresses with your IP and IP of 127.0.0.1
--TCP Dyanmic Ports (Remove the 0 and leave empty)
--TCP Port 1433
Open up Windows Firewall with Advanced Security
-Click on Inbound Rules
--Create the following rules
SQL
1433 - TCP - Check if you want Domain, Private, and Public Access
SQL
1434 - UDP - Check if you want Domain, Private, and Public Access
Transact-SQL debugger (Used for Visual Studio)
135 - TCP - Check if you want Domain, Private, and Public Access
So this is something that seems to have fairly poor documentation on. Setting a unique column in msSQL can be done by using the following command:
ALTER TABLE @tableName ADD UNIQUE(@column)
Simply execute the following command:
DBCC CHECKIDENT('TableNameHere', RESEED, 0);