Horje
how to input data as id in database sql c# Code Example
how to input data as id in database sql c#
    using(SqlCommand cmd=new SqlCommand("INSERT INTO Mem_Basic(Mem_Na,Mem_Occ) output INSERTED.ID VALUES(@na,@occ)",con))
    {
        cmd.Parameters.AddWithValue("@na", Mem_NA);
        cmd.Parameters.AddWithValue("@occ", Mem_Occ);
        con.Open();

        int modified =(int)cmd.ExecuteScalar();

        if (con.State == System.Data.ConnectionState.Open) 
            con.Close();

        return modified;
    }
}




Sql

Related
what does the -p flag do in mysql cli Code Example what does the -p flag do in mysql cli Code Example
find invalid datetime field Code Example find invalid datetime field Code Example
sql int +1 Code Example sql int +1 Code Example
primary key Code Example primary key Code Example
sql server split string and insert into table select Code Example sql server split string and insert into table select Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7