Category Archives: SQL Server 2008

Difference by SQL NULL and empty string ‘ ‘

What is the difference between null and  ” (empty string)? Null is actually a value which means something is empty (confirmed empty not just left blank). ” mean a string that has not value in it. ALTER PROCEDURE test_null — … Continue reading

Aside | Posted on by | Leave a comment

SQL column with default date and time

The following shows how to specify default datetime field for a field in MSSQL and MYSQL. You do not have to specify it in the query. It is automatically filled when a record is inserted. MSSQL In MSSQL the function … Continue reading

Posted in SQL Server 2008, Uncategorized | Leave a comment

SQL DISTINCT usage

Note: SQL DISTINCT is available only in MS SQL not MySQL Select Distinct * from table removed duplicates rows not duplicate column. DISTINCT works on rows not column. If you join two tables lets say Doctors                                                             Appointment (Patients) doc_id | … Continue reading

Posted in SQL Server 2008 | Leave a comment