SQL like ÎÊÌâ
select ID,MainFunctionID,MainFunction,MainID,MainIDDescription,ModeID,ActionPageName,ActionBtnName,Description,IsActive,ModifyID,ModifyDate
from T_LogWriteSet where MainID = ''' AND Description Like '%'%'
ÇëÎÊ AND Description Like '%'%' ×îºóÃæÒ»¸ö%ΪʲôûÓÃÄØ£¿
ÄÄÀïûÓÃ
select ID,MainFunctionID,MainFunction,MainID,MainIDDescription,ModeID,ActionPageName,ActionBtnName,Description,IsActive,ModifyID,ModifyDate
from T_LogWriteSet where MainID = ''' AND Description Like 'g'g'
Incorrect syntax near 'g'.
SQL code:
if object_id('tb') is not null drop table tb
go
create table tb(id int identity(1,1),name varchar(10))
insert tb select
'' union all select
'1' union all select
'1''2' union all select
'9'''
/*
select * from tb
id name
----------- ----------
1
2 1
3 1'2
4 9'
(4 ÐÐÊÜÓ°Ïì)
*/
select * from tb where name like '%''%'
id name
----------- ----------
3 1'2
4 9'
(2 ÐÐÊÜÓ°Ïì)
???
SQL code:
select ID,MainFunctionID,
Ïà¹ØÎÊ´ð£º
´ó¼Ò°ïæ¿´¿´Õâ2¸ösqlÓï¾äÄĸö²éѯµÄËٶȸü¿ìµã¡£Ð»Ð»°ïæ¡£±È½Ï׿±¡£ÔÚ×öÐÔÄܲâÊÔ¡£
select * from
±íA LEFT OUTER JOIN ±íB ON (±íA.id || ' ' =±íB.id) ,±íC , ±íD, ±íE
WhereÆäËûÌõ¼þ
select * ......
ÒÑÖª´ÓB,±íÖÐÕÒ³öID, NAMEÁ½ÏîÓëC±íÏàͬµÄÊý¾Ý£¬ÔÙÒÀ¾ÝB±íÖо¹ý²éѯ³öÀ´µÄID,CODEÁ½ÏîÊý¾Ý²éѯÓëA±íID,CODEÁ½ÏîÏàͬµÄÊý¾ÝÖжÔÓ¦µÄEMAILÀ´£¬²¢ÁгöÈçÏÂD±íµÄÐÎʽ£¬²»ÖªÎÒÊÇ·ñ±íʾÇå³þ£¿Âé·³°ïÎÒÁÐһϹ«Ê½ºÃÂð£¿Íò· ......
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
ÔÊý¾Ý
ÉÌÆ· Ô¼Û ´òÕÛ·½Ê½1 ÕÛ¿Û1 ´òÕÛ·½Ê½2 ÕÛ¿Û2
±Ê¼Ç±¾ 10000 NULL 0 NULL&nb ......