Pages

Tuesday, 7 October 2014

SQL ALTER TABLE Statement

Today I am going to talk about how to ALTER table in DBMS (Database Management System). It doesn't matter what is  your DBMS I'll do some SQL queries which will match to your requirement. Simply, statement can be used to do alterations to an existing database table. We can identify those alterations as below; Add new column. Modify...
Read More

Monday, 21 April 2014

SQL Between Operator

Image from => http://tapoueh.org/images/sql-logo.png Sometimes you may need to select values thin a range in your query. SQL has a powerful operator for this kind of situations. It is the "BETWEEN" Operator. it has a very simple syntax; let discuss it with an example. Example 1 Above query will return all customer data...
Read More

Thursday, 20 March 2014

How to Initialize Objects By Using Object Initializer (C#)

   There are many ways to initialize an object. But using this method you can initialize your object from one line of code. So this is efficient and easy for the developer. No need to write repeating object names to set the properties of the initializing object. As my experience this way it is easy to track and trace errors...
Read More

Wednesday, 19 March 2014

How to Format a DateTime Object Using ToString() Method

It is very important that how we display dates and time to the user. Fortunately .Net framework facilitates us to convert DateTime objects to its equivalent string using a specific format. To do this we can use DateTime objects' ToString() method. The format should be mention within the brackets of the method.  There are lot...
Read More

What is the CSS Equivalent for align = "center"

You may already know or you may not that some HTML attributes are now outdated. Since we have a powerful styling language called CSS some HTML attributes are not in use now. The most important thing is most updated web browsers may not render those HTML attributes properly.  If you have a HTML page with old markup, it good to...
Read More

Tuesday, 18 March 2014

How to Close or Exit From a WPF Application Programmatically Correctly

I recently figured out that a WPF Application cannot close as we suppose to do in windows applications. So I Googled it, I have found several ways to do it and I am in a mood to share those with you guys. The best and proper way to close WPF application is by calling Shutdown() method; Calling it may give you several advantages,...
Read More

Monday, 17 March 2014

SQL Foreign Key Constraint

When we want to establish a relationship between two tables, eventually we have to do it with a help of Foreign Key. It refers one table to another tables Primary Key. To demonstrate it we will need two tables. Its see how to relationship between those two table; It is so simple, but make sure to name your constants otherwise...
Read More

Sunday, 16 March 2014

How to get Server Date In MSSQL Server, Oracle and MySQL

I always forget how to retrieve current server date no matter what DBMS environment I am using. It just a simple SQL function but it doesn't resides in my mind. Anyway lets see how do it in MSSQL Server, Oracle and MySQL DBMSs; Result in MSSQL Server is shown as below;  MSSQL Server Result  ...
Read More

SQL Primary Key Constraint

  Although this is not a good way to start a blog, I thought that I would document the scenarios which I have to again and again Google. So it would help to and also some one who Google for help.  Today I researched about Primary Key constraint in database tables, I know that all of you are very much aware about it, but...
Read More