For examble: In a table name like 1.Test 2.Test. 3.Test.. 4.Test... How will get the name "Test" using distinct keyword?
ALTER PROCEDURE [OS].[UPDATE_ItmsRecords] @itemName varchar(100), @itemDesc varchar(1000), @itemCat varchar(100) AS DECLARE @Validate...
If TextBox2.Text <> "" Then int authorId=Convert.Toint32(TextBox2.Text.ToString()) connectionString = "Data...
The following query only reset the value from last record on wards. but not reset the middle records DECLARE @max_id BIGINT SELECT...
First create a new table and insert the records for following query CREATE TABLE tblnew (Ps_ID INTEGER NOT NULL, DT DATETIME NOT NULL,...
Hi, If u retrieve the previously entered records use the SELECT IDENT_CURRENT(‘table name’) is used the last inserted record id value...
Hi, Please use the below link more date time format conversion Time and Date Formats We can display the date and time data in many...
Use bellow data type to store Document and picture types of data. VARBINARY(MAX)
In your trigger "Trigger1" the script line set @id1=(select id from sal_t) result in more than one row when you are inserting the second row to...
Use the following scripts, You didn't mention any condition to retrive "id" column from tbl_account table.If the condition is avialable then add...
Sql Server does not have a LIMIT functionality. You can use TOP. select TOP 5 * from Table1
Use the following scripts, declare @Qty as int declare @ItemID as varchar(10) declare @Units as int declare @Item_No as int set @Units=3 set...
DBCC CHECKDB - Check the allocation, and integrity of all objects in a database. Syntax DBCC CHECKDB [( 'database' | database_id...
Try this query, set @query=@query+ 'cast(ID as varchar) like ''%'+ltrim(@id)+'%''' set @query=@query+ @option+' userName like ''%'...
Separate names with a comma.