Category Archives: SQ L& MYsql

CONCAT in mysql

concat function is used to concatenate two strings. See the example Select * from mydoubts_data ————————————- |id | jobid | name | salary | age| ————————————- |1 | 121 | vasanthan| 2000 |32 | |2 | 122 | John | 3000 |28 | |3 | 123 | Kiran | 3400 |24 | |4 | 154… Read More »

SQRT function in mysql

see the example below Select * from mydoubts_data ————————————- |id | jobid | name | salary | age| ————————————- |1 | 121 | vasanthan| 2000 |16 | |2 | 122 | John | 3000 |64 | select id,name,salary,SQRT(age) from mydoubts_data ——————————————- |id | jobid | name | salary | SQRT(age)| ——————————————- |1 | 121 |… Read More »

SUM function in Mysql

This function used to find the sum of fields in various records See the example below Select * from mydoubts_data ————————————- |id | jobid | name | salary | age| ————————————- |1 | 121 | vasanthan| 2000 |32 | |2 | 122 | John | 3000 |28 | |3 | 123 | Kiran | 3400… Read More »

Count function in mysql

counting the number of records in a table. Example: Select * from mydoubts_table; ———————————— |firstname | lastname | address | ———————————— |vasanthan | pv | india | |nazar | gt | texas | |raju | raina | sreelanka| |gt | nazar | texas | |Martin | jacob | Dubai | |mydoubts.in | | newyork |… Read More »

Union clause in mysql

union means joining more than tables.It will not create problems if tables having different columns Example: Suppose we have three tables as below Select * from mydoubts_personal; ———————————— |firstname | lastname | address | ———————————— |vasanthan | pv | india | |nazar | gt | texas | ————————————- Select * from mydoubts_buisness ————————————- |last_name |… Read More »

BETWEEN in Mysql

This clause will replace greater/less than conditions Example: Select * from mydoubts_data ————————————- |id | jobid | name | salary | age| ————————————- |1 | 121 | vasanthan| 2000 |31 | |2 | 122 | John | 3000 |29 | |3 | 123 | Kiran | 3400 |22 | |4 | 154 | Raju |… Read More »