HomeWeb HostingReseller Web HostingDedicated ServerResources & Support

Go Back   Web Hosting Technical Support Discussion Forum > General Web Hosting Discussion Forum and Support > How To's > Database Management

Database Management MS SQL 2000/2005, MySQL and MS Access database related How To's Accu Web Hosting
Become a Fan

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 09-01-2008
Member
 
Join Date: Jun 2006
Posts: 91
Blog Entries: 12
Rep Power: 0
John_Accuwebhosting is on a distinguished road
Default Some useful SQL commands

Selecting values from the database table


Select query is used to select data from database table. The syntax is below:
Syntax:- Select column_name from table_name.
Use “distinct” keyword if you want to return only distinct (not common) values.
Syntax:- select distinct column_name from table_name
Sorting Rows:


Order by clause is used to return result in sorted way. For example:


Select column_name from table_name order by column_name


Joins:
Inner Join, Left Join, Right Join, Union Join


Inner Join:
Return all the rows matching in both the tables.


Left Join:
Return all the rows of first table even if they are not matching with second table.


Right Join:
Return all the rows of second table even if they are not matching with first table.


Union:
To display information from two tables with same data type. Union ALL will display duplicate rows of two tables.


Difference between truncate and delete:


Truncate will remove all the data from a table but it will not delete the table it self.


ALTER TABLE:
This statement is used to add or drop columns in an existing table.
__________________
John D.
Support Technician,
accuwebhosting.com
Windows based hosting
Linux based hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:58 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
http://www.accuwebhosting.com/terms.htm


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42