If you want to find SQL Column that dose not start with Numbers of Numeric here is the Query.
Select Address From Corporation
where Address Not LIKE '[0-9]%';
If you want to find SQL Column that start with Numbers of Numeric here is the Query.
Select Address from Corporation
where Address LIKE '[0-9]%';
Showing posts with label T-SQL Query. Show all posts
Showing posts with label T-SQL Query. Show all posts
Find Non Integer From SQL Column
If you want to find Non-Integer from Column in SQL Server that does not have Data Type integer , Use following SQL Query.
Select * From [ChildRegistration]
Where IsNumeric(ChildID + '.0e0') = 0
If you want to find Integer from Column in SQL Server that does not have Data Type integer , Use following SQL Query.
Select * From [ChildRegistration]
Where IsNumeric(ChildID + '.0e0') = 1
Add Identity Column and Populate Column in SQL Server
Add Column using SQL Statment and Populate Identity Column in SQL Server
Alter Table ChildRegistration
Add RegistrationID Int Identity(1000000,10)
1000000 Means Value Start with 1000000 and adding in 10 increment.
Alter Table ChildRegistration
Add RegistrationID Int Identity(1000000,10)
1000000 Means Value Start with 1000000 and adding in 10 increment.
Find Non Date in Column using IsDate
Suppose We have Employee Table with Hiring Date and HiringDate is with Data Type Nvarchar.
We want to find out which one is non date in Hiring Column ?
We want to find out which one is non date in Hiring Column ?
Add Calculated Column Age
Add Calculated Age Column in SQL Server through Query
Alter table Child_Record
Add Age AS (datediff(year,[BirthDate],getdate() ))
Alter table Child_Record
Add Age AS (datediff(year,[BirthDate],getdate() ))
Subscribe to:
Posts (Atom)