SQLite与MySql、Oracle的使用区别(C#)

1.参数

SQLiteParameter p = new SQLiteParameter(":project_id", DbType.String);
p.Value = project_id;
 MySqlParameter p = new MySqlParameter("?project_id", MySqlDbType.VarChar);
 p.Value = project_id;
 OracleParameter p = new OracleParameter(":project_id", OracleDbType.Varchar2);
 p.Value = project_id;

2.参数类型

SQLite参数类型通过DbType设置,MySql参数类型通过MySqlDbType设置,Oracle参数类型通过OracleDbType配置爱

SQLite参数 :

SQLiteParameter[] p = {
                    new SQLiteParameter(":project_id", DbType.String),
                    new SQLiteParameter(":project_name", DbType.String),
                    new SQLiteParameter(":project_outer_name", DbType.String),
                    new SQLiteParameter(":project_status", DbType.String),
                    new SQLiteParameter(":project_type",DbType.String),
                    new SQLiteParameter(":hardware_platform",DbType.String),
                    new SQLiteParameter(":platform_model",DbType.String),
                    new SQLiteParameter(":leader_name",DbType.String)
}
p[0]=project_id;
...

MySql参数: 

MySqlParameter[] p = {
                  //MySQL传参格式为:?参数
		        new MySqlParameter("?project_id", MySqlDbType.VarChar),
	            new MySqlParameter("?project_name", MySqlDbType.VarChar),
                new MySqlParameter("?project_outer_name", MySqlDbType.VarChar),
		        new MySqlParameter("?project_status", MySqlDbType.VarChar),
		        new MySqlParameter("?project_type",MySqlDbType.VarChar),
                new MySqlParameter("?hardware_platform",MySqlDbType.VarChar),
                new MySqlParameter("?platform_model",MySqlDbType.VarChar),
                new MySqlParameter("?leader_name",MySqlDbType.VarChar)
}
p[0]=project_id;
...

Oracle参数:

OracleParameter[] p = {
                     new OracleParameter("?project_id", OracleDbType.Varchar2,10),
	                new OracleParameter("?project_name", OracleDbType.Varchar2),
                    new OracleParameter("?project_outer_name", OracleDbType.Varchar2),
		            new OracleParameter("?project_status",OracleDbType.Varchar2),
		            new OracleParameter("?project_type",OracleDbType.Varchar2),
                    new OracleParameter("?hardware_platform",OracleDbType.Varchar2),
                    new OracleParameter("?platform_model",OracleDbType.Varchar2),
                    new OracleParameter("?leader_name",OracleDbType.Varchar2)
					
                                   };
p[0]=project_id;
...

SQL的Left Join、Right Join 和Inner Join

sql之left join、right join、inner join的区别

Left join(左联接):返回包括左表中的所有记录和右表中联结字段相等的记录 
Right join(右联接) :返回包括右表中的所有记录和左表中联结字段相等的记录
Inner join(内连接): 只返回两个表中联结字段相等的行

 

 

 

 

 

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值