BEGIN SELECT 'Lakhan Pal' DECLARE @time char(5) SET @time=CONVERT(char(5),DateAdd(mi, 1, GetDate()),108) WAITFOR TIME @time SELECT ' Garg' END
CREATE TABLE Table_Referenced ( id INT CONSTRAINT pk_id PRIMARY KEY(id)--Create Primary Key here ); GO CREATE TABLE Table_Referencing ( RID Int CONSTRAINT fk_RID FOREIGN KEY(RID)REFERENCES Table_Referenced(id)--Creates foreign key names 'RID' which is referring primary key of Table_Referenced.id ); GO
SELECT definition FROM sys.system_sql_modules
SELECT * FROM sys.parameters D INNER JOIN Sys.Objects O ON O.object_id=D.object_id WHERE O.name='Course_Insert_sp'
Select * from sysprocesses
select * from sysprocesses where open_tran > 0
Kill [Process ID]
dbcc shrinkdatabase (TempDAabase,10)