Question: Is it possible to optimize the following queries by merging them inside a single SQLCommand? 

```
SqlCommand cmd = new SqlCommand
{
    CommandType = CommandType.Text,
    CommandText = "DELETE FROM cbu_naslovi WHERE [ID]='" + CurrentID + "'",
    Connection = con
};
SqlCommand cmd1 = new SqlCommand
{
    CommandType = CommandType.Text,
    CommandText = "DELETE FROM cbu_deli WHERE [IDX]='" + CurrentID + "'",
    Connection = con
};
cmd.ExecuteNonQuery();
cmd1.ExecuteNonQuery();

```

EDIT: Working solution, as suggested by the community answers bellow

```
SqlCommand cmd = new SqlCommand
{
    CommandType = CommandType.Text,
    CommandText = "DELETE FROM cbu_naslovi WHERE [ID] = @CurrentID; DELETE FROM cbu_deli WHERE [IDX] = @CurrentID",
    Connection = con
};
cmd.Parameters.AddWithValue("@CurrentID", CurrentID);
cmd.ExecuteNonQuery();

```

Answer: 
Yes, you can just separate them with a semicolon. For example I have code that executes the following in a single call

```
SET NOCOUNT ON;
DECLARE @decimalDate DECIMAL(12,0);
DECLARE @charDate CHAR(12);
DECLARE @utcDate DATETIMEOFFSET;
DECLARE date_cursor CURSOR FOR SELECT {1} FROM {0} WHERE ISNULL({1},0)!=0;
OPEN date_cursor;
FETCH NEXT FROM date_cursor INTO @decimalDate;
WHILE @@FETCH_STATUS=0
BEGIN
    BEGIN TRY SET @charDate=CONVERT(CHAR(12),@decimalDate);
        SET @utcDate=SwitchOffset(
                CONVERT(DATETIME,'20'
                    +SUBSTRING(@charDate,1,2)+'-'+SUBSTRING(@charDate,3,2)+'-'
                    +SUBSTRING(@charDate,5,2)+' '+SUBSTRING(@charDate,7,2)+':'
                    +SUBSTRING(@charDate,9,2)+':'+SUBSTRING(@charDate,11,2)
                ,121) AT TIME ZONE '{3}',0);
    END
    TRY BEGIN CATCH
        SET @utcDate=SysUtcDateTime();
    END CATCH;
    BEGIN
        TRY UPDATE {0} SET {2}=@utcDate WHERE CURRENT OF date_cursor;
    END TRY
    BEGIN CATCH END CATCH;
    FETCH NEXT FROM date_cursor INTO @decimalDate;
END;
CLOSE date_cursor;
DEALLOCATE date_cursor;

```

There are exceptions. For instance the "create procedure" statement must be the first statement of a block. But most DML can be batched like this.
if you need to run Non Query operation, you could try to execute bunch of commands by using `Server` object.
benefit: you could use `GO` in SQL statement. `Command` does not allow to use `GO`.

```
server.ConnectionContext.ExecuteNonQuery("your SQL statement -- could be 100 statements with hundrends of GO commands", ExecutionTypes.Default)

```

server variable has type `Server`