Display row value as a TABLE column using SQL select statement
Display row value as a TABLE column using SQL select statement
2012-01-12 (first published: 2007-10-26)
4,709 reads
Display row value as a TABLE column using SQL select statement
2012-01-12 (first published: 2007-10-26)
4,709 reads
This SP is used to identify and replace the owner of the database objects. This SP will give display object id, object name, owner id, owner name and concatenate object + owner name with brackets. SP does change the owner for the following objects. SP should available in "master" database to execute in more than […]
2005-12-06 (first published: 2005-05-10)
329 reads
Script will drop the Default, Primary, Unique, Foreign Constraints, Index and ROWGUID on Unique Identifier data type column and finally it alters the unique identifier to varchar (38) data type. I have compile and execute the script in my database server. Script has executed successfully.
2005-01-12 (first published: 2004-12-24)
765 reads
This sp will return the column names for a table(s) and form a "Select Statement" for a table(s). We can pass a table name as a parameter to display a "Select Statement" for that table.
2004-03-04
114 reads
This sp will return the dependency details of the select table or all tables as a resultset. This resultset will display the dependency details if it is used in 1. select * from table or2. insert/delete/update dml statement or 3. select col1, col2 from table.
2004-02-25
223 reads
We can use this sp to clear data in tables. I mainly created this sp for two reason. 1.This is useful to commence the testing from scratch. 2.Whenever we ask the database backup from our customer. They hesitant to give the production database because of confidential. I have used Delete and Truncate statement to clear […]
2003-11-06
171 reads
MSSQLServer has got sp_depends system sp to display the dependencies for a stored procedure, table and view. sp_depends does not support to display the User-defined data type dependencies. For custom database, we will create user defined data types (UDDT) and add this UDDT to a column/variable in a table/stored procedure. This sp (UDTDepends) will help […]
2003-10-30
455 reads
This sp is used to update index in a database. This sp has got three optional varchar parameters. First parameter will take the tablename. Second parameter will take the indexname. Third parameter will take the fillfactor. The following option we can execute the sp in a user database.1. exec StabilizeIndexIt will update all index in […]
2003-10-29
284 reads
By Steve Jones
Redgate acquired a data modeling tool from Vertabelo recently and I wanted to explore...
By Brian Kelley
The advantage of understanding the make-up of the exam: I can tailor my efforts...
Lots of people have created Power BI reports, using interactive data visualizations to explore...
Comments posted to this topic are about the item Filtered Indexes: The Developer’s Secret...
Comments posted to this topic are about the item Is Data Modeling Common?
Comments posted to this topic are about the item Getting The Database Name
I run this code to connect to SQL Server 2022 from the command line.
sqlcmd -S localhost -EAt the command line, I run these two commands:
SELECT ORIGINAL_DB_NAME() GOWhat is returned? See possible answers