SQL Server Queries


Database


Set default database in sql server management studio (SSMS)
Sql query for list out all tables which has not any primary key in sql server
Write a sql query to get all the parent and child tables of a given table in sql server
Sql query to add a new column of all tables of given database in sql server
Sql query to drop all the tables of a database of given schema in sql sever--
Sql query to drop or delete all the tables of a database which table name starts with given characters in sql server 
Sql query to drop or delete all the tables of a database which has modified before the given date in sql server
Sql query to drop or delete all the tables of a database which has created before the given date
Sql query to list all the user defined tables in database which has been modified before or after given table in sql server
Sql query to list all the user defined tables in database which has been created before or after given table in sql server
Sql query to list all the user defined tables of a database in sql server
Sql query for DELETE all the records or rows of all the tables in database in sql server
Sql query for SELECT all the records or rows of all tables in database in sql server
How to check default setting of nullability of database in sql server


SELECT statement


Sql query to get table data output in HTML format in sql server
Create a CSV file of any table by sql query in sql server
SQL query to get all the collations in sql server
How to select data two columns of a table as a single row in sql server
How to select or get data of a column delimited by comma in sql server


WHERE clause


Sql query to get all stored procedures name which contains given text or string in sql server
How to perform case sensitive comparison in sql server
Sql query to search a given text or string in all the columns of all the tables of a database in sql server
IF statement or condition in WHERE clause of SELECT statement in sql server


Table


Sql query for list out all unique columns of tables including primary key of a database in sql server
Write a sql query to get the script of create table statement in sql server
Sql query to get the name of columns of a specified table in sql server
Sql query to get the total number of columns of a specified table in sql server
Sql query to get the name of schema of given table in sql server
How to get the all the columns name of a given table delimited by comma in sql server?
How to get the all the columns name of a given table in sql server?
How to know the length of column of a table in sql server?


INSERT statement


Insert default value when data or parameter is null in sql server.
How to insert the data into the identity column in sql server


Merge statement


Sql query to update and insert records without deleting and inserting into a table in sql server


DROP


Sql query to forcefully drop a table even if foreign key constraint on table in sql server


Stored procedure


Sql query to get script or text of any stored procedures without modifying in sql server


Data type


How to check a given data or column is type of integer or not in sql server?
How to check a given data or column is type of bit or not in sql server?
How to check a given data or column is type of bigint or not in sql server?
How to check whether a given data or column is type of tinyint or not in sql server?
How to check whether a given data is numeric or not in sql server?


Common table expression


Sql query to find out missing numbers in a sequence in sql server
Sql query to get the series of integer numbers of given ranges in sql server


Database mail and change tracking (CT) 


Send an email when data of any columns of table changes in sql server


EXECUTE


Sql query to validate or check syntax of sql statement in sql server
How to compile any query without executing it in sql server


Cmdshell


How to create a text file using sql query in sql server

No comments:

Post a Comment