SQL Check Script