Quasar distribution is our main source of information about the large-scale distribution of matter at redshifts greater than 1 . It can also shed light on the open questions of quasar formation . The present paper analyses the quasar clustering using the two-point correlation function ( 2pCF ) and the largest existing sample of photometrically selected quasars : the SDSS NBCKDE catalogue ( from the SDSS DR6 ) . A new technique of random catalogue generation was developed for this purpose , that allows to take into account the original homogeneity of the survey without knowledge of its imaging mask . When averaged over photometrical redshifts 0.8 < z _ { phot } < 2.2 the 2pCF of photometrically selected quasars is found to be approximated well with the power law w ( \theta ) = \left ( \theta / \theta _ { 0 } \right ) ^ { - \alpha } with \theta _ { 0 } = 4 ^ { \prime \prime } .5 \pm 1 ^ { \prime \prime } .4 and \alpha = 0.94 \pm 0.06 over the range 1 ^ { \prime } < \theta < 40 ^ { \prime } . It agrees well with previous results by , obtained for samples of NBCKDE quasars with similar mean redshift , but averaged over broader z _ { phot } range . The parameters of the deprojected 2pCF averaged over the same redshift range and modelled with a power law \xi ( r ) = \left ( r / r _ { 0 } \right ) ^ { - \gamma } , are r _ { 0 } = 7.81 ^ { +1.18 } _ { -1.16 } h ^ { -1 } Mpc , \gamma = 1.94 \pm 0.06 , which are in perfect agreement with previous results from spectroscopic surveys . We confirm the evidence for an increase of the clustering amplitude with redshift , and find no evidence for luminosity dependence of the quasar clustering . The latter is consistent with the models of the quasar formation , in which bright and faint quasars are assumed to be similar sources , hosted by dark matter halos of similar masses , but observed at different stages of their evolution . Comparison of our results with studies of the X-ray selected AGNs with similar redshift shows that the clustering amplitude of optically selected quasars is similar to that of X-ray selected quasars , but lower than that of samples of all X-ray selected AGNs . As the samples of all X-ray selected AGNs contain AGNs of both types , our result serves as an evidence for different types of AGNs to reside in different environments .