T-SQL

Technical Article

Detection of Broken Forign Key Relationship

  • Script

Under special circumstances, it could happen that database contains "orphan" records. Data in dependant table exists without it's "parent" record in a master table. It could be caused by a bulk insert operation without CHECK_CONSTRAINTS option, or by disabling foreign key for a while or adding a foreign key to a table that already contains […]

5 (1)

You rated this post out of 5. Change rating

2002-03-27

193 reads

Technical Article

Rows count for each and every table in a DB 

  • Script

       By using this script one can find number of rows for each and every table in a database. Just cut and past this script in your DB and excute. A stored procedure will be created as 'Get_rowcounts_for_eachtable'. If U excuted this stored procedure, U can get all tablenames and rowcounts for respected […]

You rated this post out of 5. Change rating

2002-03-07

584 reads

Technical Article

SP to import to a file

  • Script

Is a SP that imports a table to a file. You just put the table name, the path and the sa password and then you have it. It is important that it parse the table inserted (pubs.dbo.sales for example) and checks that the db, the table with the owner exists

You rated this post out of 5. Change rating

2002-01-28

1,676 reads

Blogs

SQL Aggregate Functions: Your Essential Guide & Cheat Sheet

By

SQL aggregate functions are your go-to tools for transforming raw data into actionable insights....

T-SQL Tuesday #174 – My Favorite Interview Question

By

This month is a great topic to me. I think growing and improving your...

T-SQL Tuesday #174: Job Interview Questions

By

Once upon a time, I used to think of difficult technical questions to ask...

Read the latest Blogs

Forums

getting logged in user name to the pc that running the report

By tanehome

hi all, is there anyway in SQL to getting logged in user name to...

SQL JOB add/modified

By Shelley Allen

Is there a trigger to notify when a new SQL Agent job is created/modified?

View generating different plan

By DamianC

Hello   I have a view based upon a number of tables I'm selecting...

Visit the forum

Question of the Day

Full Text Editions

In which editions can I use Full-Text and semantic search?

See possible answers