본문 바로가기

전체 글303

NHibernate lazyload : 화면에 보이는 영역에서만 로딩을 하는 기법, 실제 사용자가 보고있는 가시영역만 로딩하는것 Start Fluent NHibernate Introduction Start your project from Visual Studio and say GoodBye to SQL Server and Tables. What is NHibernate? Why do we use this technology? How to start using NHibernate? NHibernate is an ORM (Object Relational Mapping) that maps relational data and objects. When you use NHibernate, you don't have to start f.. 2015. 8. 4.
EXISTS로 시작하는 하위 쿼리 출처 : https://technet.microsoft.com/ko-kr/library/ms189259(v=SQL.105).aspx 하위 쿼리가 EXISTS 키워드로 시작하면 존재 여부를 테스트할 수 있습니다. 외부 쿼리의 WHERE 절은 하위쿼리에서 반환된 행이 있는지 여부를 테스트 합니다. 하위 쿼리는 실제로 데이터를 생성하지 않고 TRUE 또는 FALSE 값을 반환합니다. EXISTS로 시작하는 하위 쿼리는 다음 구문을 사용합니다. WHERE [NOT] EXISTS (subquery) SELECT Name FROM Production.Product WHERE EXISTS (SELECT * FROM Production.ProductSubcategory WHERE ProductSubcategoryID .. 2015. 7. 29.
MS-SQL 다중 업데이트 Update 사용시 하나의 컬럼이 아니라 여러개의 컬럼을 사용하고 싶을때 쓰는 쿼리 update Employee set salary = 40000000, name = '홍길동', pNumber = '010-5959-5959' where eNumber = 100 , 로 구분지어 사용하면됌 2015. 7. 15.
MS_SQL 반복문 [출처 : http://hyubi.net/2] declare @mySTAGE int set @mySTAGE = 101 while @mySTAGE < 211 begin insert into SCount (id,stage,count,reward,star,slotNo) values (1000001536,@mySTAGE,1,1,3,0); set @mySTAGE=@mySTAGE+1 end 이런식으로 쓴다. 처음에 begin 하고 end 사이에 set 값 을 써주지 않아서 무한 루프에 빠졌었다. 2015. 7. 14.
DB 데이터 형식 맵핑 [ 출처 : https://msdn.microsoft.com/ko-kr/library/ms378878(v=sql.110).aspx ] 알아 두면 좋지 데이터 형식 매핑다음 표에서는 기본 SQL Server, JDBC 및 Java 프로그래밍 언어 데이터 형식 간의 기본 매핑을 나열합니다.SQL Server 형식JDBC 형식(java.sql.Types)Java 언어 형식bigintBIGINTlongbinaryBINARYbyte[]bitBITbooleancharCHARStringdateDATEjava.sql.DatedatetimeTIMESTAMPjava.sql.Timestampdatetime2TIMESTAMPjava.sql.Timestampdatetimeoffset(2)microsoft.sql.Types.DA.. 2015. 7. 7.
int, bigint,smallint, and tinyint 사이즈와 범위 [출처 : https://msdn.microsoft.com/en-us/library/ms187745.aspx] int, bigint, smallint, and tinyint (Transact-SQL) Other Versions SQL Server 2012 SQL Server 2008 R2 SQL Server 2008 SQL Server 2005 Applies To: SQL Server 2014, SQL Server 2016 PreviewTopic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes .. 2015. 7. 7.