Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

Browsing "tip"

2

Where to find the xtype info for SQL Server in a table

If you look at the sys.sysobjects view, you will see an xtype column listed

Object type. Can be one of the following object types:
AF = Aggregate function (CLR)
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L…

Read More...
1

Unique index difference between Oracle and SQL Server

When working with different database systems you have to be aware that some things work differently from one system to another. I already blogged a couple of times about differences between SQl Server and Oracle, those post are the following
Truncate r…

Read More...
0

An Oracle NULL/Blank gotcha when coming from SQL Server

In my Differences between Oracle and SQL Server when working with NULL and blank values post I already showed you how blanks and NULLS are handled differently between Oracle and SQL Server. Today I found another interesting tidbit.

I you have a varc…

Read More...
0

Truncate rollback differences between SQL Server and Oracle

I wrote a blogpost about the fact that there is a common myth that you can’t rollback a truncate statement in SQL this post was written on June 13, 2007 and it showed you that you could rollback a truncate. Here is some code that shows that.

CREATE…

Read More...
1

What is the Dual table in Oracle and why do I need it?

When coming from SQL Server, you might find it weird that you don’t see code that looks like this

select 2

That code won’t run in Oracle, unlike SQL Server, Oracle requires the use of the FROM clause in its syntax. This is why Oracle has DUAL

Read More...
1

Differences between Oracle and SQL Server when working with NULL and blank values

If you ever have to start working with Oracle you have to keep in mind that NULLs and blank values don’t work exactly the same as in SQL Server. Let’s take a look at some examples

Create this table and insert some rows
create table TestNull(Col2 var…

Read More...
3

Don’t put a return statement in a stored procedure inside a transaction

I answered the following question earlier this evening: Return an output parameter from SQL Server via a stored procedure and c#

Here is the proc in question, take a good look at it, do you see the problem?

ALTER PROCEDURE [dbo].[Insert_UnknownCus…

Read More...
3

Dammit people, get to know check constraints and use them!

A couple of months back we were interviewing people for 2 positions, one of the questions I like to ask is the following: If you have a column in a table that’s an integer data type how can you restrict the values to be between 1 and 10? Most of the peo…

Read More...
2

How to connect to SQL Server when your default database is unavailable

I was restoring a TB+ sized database on our staging database today. Someone needed to use a different database but he couldn’t login because the database I was restoring was the default database for the login he was using. I told him to click on the Opt…

Read More...
1

SQL Advent 2011 Day 15: Joins

In my Are you ready for SQL Server 2012 or are you still partying like it is 1999? post, I wrote about how you should start using SQL Server 2005 and SQL Server 2008 functionality now in order to prepare for SQL Server 2012. I still see tons of code tha…

Read More...
Next Page »