Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

8/27/2012

SQL Delete current database

I need to delete my current database which I am using it , I googled around and found this answer:

http://sqlserver2000.databases.aspfaq.com/how-do-i-drop-a-sql-server-database.html

ALTER DATABASE myDataBase
    SET SINGLE_USER
    WITH ROLLBACK IMMEDIATE

DELETE DATABASE myDataBase 

6/19/2012

SQL Constraints

Constraints limit the type of  data that can go into the table.
The following are the constraints:
  1. NOT NULL
  2. UNIQUE
  3. PRIMARY KEY
  4. FOREIGN KEY
  5. CHECK
  6. DEFAULT

6/18/2012

SQL Joins

Hi newbies,
Want to learn SQL joins at a glance!!, here you go... SQL joins is Venn diagram representation:
A very nice picture given in codeproject.

http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins