Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Tuesday, 30 July 2013

Querty to Get Identity Tables information on SQL

Query to get Last Identity value inserted in tables in a database:

       ColumnName = name ,
       OriginalSeed = seed_value ,
       Step = increment_value ,
       LastValue = last_value ,
       IsNotForReplication = is_not_for_replication
FROM sys.identity_columns

Monday, 1 July 2013

Copy data from Excel sheet to SQL Server 2012

Copy data from Excel sheet to SQL Server 2012
Using copy method:
Step 1:
Verify the all values in the excel sheets are valid

create a table name as per the excel sheet

Open the table with right clicke table name and click open table

Step 4 :
Copy all data from excel sheet by right click on mouse of excel sheet

Step 5:
Paste the data from open table in SQL Server

Step 6:
Wait for all the data to paste to SQL Server table

Step 7:
After verify this close the table

Step 8:
Now query the tale to ensure all the data present in table