Feeds:
Posts
Comments

Posts Tagged ‘SQL 2005’

Today while developing a page, we felt need to read database into javascript array. And we were confused if at all we can do this. So finally after googling on this we found a workaround. So I just thought of sharing this with you because I think this is really helpful. <script language=”JavaScript” type=”text/javascript”> var [...]

Read Full Post »

Today I just got went though this, this helps you to execute a string in SQL. This is how you can execute a string in SQL, Declare @query Varchar(500) Set @query = ‘Select * From Employees’ Exec (@query) OR EXEC (‘USE AdventureWorks; SELECT EmployeeID, Title FROM HumanResources.Employee;’) This way you can execute a string in [...]

Read Full Post »

How will you copy table structure using an SQL Query? This was the question I was asked in one of the inteview, after hearing this I first thought, Is there a way to copy only the table structure. I only knew the query to copy data along with its structure and take backup of tables.And [...]

Read Full Post »

Often it is required where we need to get the list of tables in our database and the colums of the table with datatype. Below is the query which will list all tables. select * from sysobjects where xtype=’U’ Query which will return list of tables with columns and respective datatype. select table_name, column_name, data_type, [...]

Read Full Post »

Follow

Get every new post delivered to your Inbox.