Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDLs 1

Status
Not open for further replies.

TiltingCode

Programmer
Apr 10, 2009
61
US
From what I have found it appears a DDL is nothing more than a bunch of SQL statements which can consist of one of the following statements:
[ul]
[li]ALTER[/li]
[li]CREATE[/li]
[li]DISABLE TRIGGER[/li]
[li]DROP[/li]
[li]ENABLE TRIGGER[/li]
[li]TRUNCATE TABLE[/li]
[li]UPDATE STATISTICS[/li]
[/ul]

You simply combine the different queries in a sql file and execute when needed, correct?
 
Yes.

I like to think of it as.... DDL queries allow you to change the structure of the database. DML queries allow you to change (or query) the data in the database.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
If you're thinking of making a script to create the objects in a database, make sure it handles the possibility that one or more objects could already exist; that objects may have dependencies and so should be removed/created in a specific order; and that you should never remove a table that contains data.

-----------
With business clients like mine, you'd be better off herding cats.
 
DDL = Data Definition Language
DML = Data Manipulation Language

Hence the terms DDL or DML query...

Queries don't need to be in a SQL file to be executed. They can be directly executed in SQL Server Management Studio (SSMS) also. If you have a problem to solve you could state it; I suspect the good fellows here on the site will be more than happy to guide you. I make this statement because you are sort of thinking in terms of a solution already.

Good luck.



MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top