Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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;
    }
}
Comment

PREVIOUS NEXT
Code Example
Sql :: nuget sqllite-net-pcl 
Sql :: mariadb current date plus 1 day 
Sql :: What is the library that should import to use all functional database features in SQLite? 
Sql :: postgres create table like another table 
Sql :: hierachichal sql query 
Sql :: grepper sql workbench download 
Sql :: postgre regex exactly 1 characters 
Sql :: mysql pv progres 
Sql :: postgresql using reserved word as column name 
Sql :: c# select mssql 
Sql :: mysql set user password for a range of ips 
Sql :: nested query with all examples 
Sql :: procedure excute monthly oracle 
Sql :: goto in SQL server in production 
Sql :: mysql workbench cannot find password 
Sql :: sql to migration codeigniter online 
Sql :: 2020 new year 
Sql :: how much space does sql server take per row 
Sql :: dbms interview questions 
Sql :: postgresql select fast check no rows 
Sql :: case when with count and combining similar values in sql 
Sql :: sql out file formate 
Sql :: how to take recent row without limit in mysql 
Sql :: order by length and alphabetical sql 
Sql :: is sql injection still possible 
Sql :: mysql sum per week 
Sql :: Sql Cursor: Implicit 
Sql :: characters found after end of sql statement 
Sql :: postgres sum substract stackoverflow 
Sql :: the differnece between to values in sql 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =