Skip to main content

AddToAny

Share/Save

How to

How Sql Joins Works

To make this article, I have taken Table A and Table B as reference tables for explaining.

SELECT * FROM A
id          name                       RowState
----------- ------------------------------ --------
1           A1                             1
2           A2                             1
3           A3                             0
4           A4                             0
5           A5                             1
 
(5 row(s) affected)
 
SELECT * FROM B
 
id          name                           RowState aid

Delete Duplicate Records From a table

I need to clean duplicate records from a table, please let me know how to it.

How to ReSeed Identity value in SQL Server?

I want to reset an identity coloumn in SqlServer. I am using

Delete from "TableName".

It is deleteing all data in the table but it is not resetting my Identity value.

I have tried Truncate Table , But I will not be able to restore my data back in case of truncate.

I need a method to delete all rows from the table and simultaneosly reset the identity value.

How to align content of a SPAN

Posted in

I want to vertical align a text in span. How to do that.

How to reset AutoNumber in MS-Access

I am working on a desktop application, where I am using MS-Access as backend. I generally use AutoNumber as a primary key.

I want to reset the AutoNumber to its initial seed, which is '1'. I have search a lot about this, but fail to reset it.

This seems to be a very simple question, but frankly speaking I dont have any prior experience of Ms-Access. I have been working on sqlserver for most of my projects.

Please Help. Thanks in Advance.

How to do Numeric Validation in Drupal Webforms

I spent a lot of time to figure out How to restrict only numeric data in drupal webforms. To my surprise drupal does'nt provide such functionality. But we can achieve it through Additional Validation in Webform Advanced Settings.

Just write this PHP code in additional validation.

  $mobile_no = $form_values['submitted_tree']['mobile_no'];
  if (strlen(trim($mobile_no)) > 0){
    if (!is_numeric($mobile_no)) {
      form_set_error('submitted][mobile_no', t('Mobile No. must be Numeric'));
    }
  }
Syndicate content