What are the difference between DDL, DML and DCL commands?
Submitted by admin on Wed, 2004-08-04 13:49
DDL
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:
CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
COMMENT - add comments to the data dictionary
RENAME - rename an object
DML
Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:
SELECT - retrieve data from the a database
INSERT - insert data into a table
UPDATE - updates existing data within a table
DELETE - deletes all records from a table, the space for the records remain
MERGE - UPSERT operation (insert or update)
CALL - call a PL/SQL or Java subprogram
EXPLAIN PLAN - explain access path to data
LOCK TABLE - control concurrency
DCL
Data Control Language (DCL) statements. Some examples:
GRANT - gives user’s access privileges to database
REVOKE - withdraw access privileges given with the GRANT command
TCL
Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
COMMIT - save work done
SAVEPOINT - identify a point in a transaction to which you can later roll back
ROLLBACK - restore database to original since the last COMMIT
SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use
Pay It Backwards: An Act Of Coffee Kindness
Arthur Rosenfeld
Posted December 23, 2008 | 08:47 AM (EST)
Just before Christmas of 2007, almost exactly a year ago, I steered into a Starbucks drive-thru line for a cup of tea on my way to teach a morning tai chi lesson. There were a few cars in line, and I got in behind them. When my turn came I gave my order at the billboard menu and moved up as far as I could while waiting patiently for the cars in front of me to get through the cashier line. While the South Florida weather would probably would have felt tropical to much of the rest of the country, I was a bit chilled and was looking forward to my hot drink.
Execute the following Microsoft SQL Server T-SQL datetime and date formatting scripts in Management Studio Query Editor to demonstrate the multitude of temporal data formats available in SQL Server.
First we start with the conversion options available for sql datetime formats with century (YYYY or CCYY format). Subtracting 100 from the Style (format) number will transform dates without century (YY). For example Style 103 is with century, Style 3 is without century. The default Style values – Style 0 or 100, 9 or 109, 13 or 113, 20 or 120, and 21 or 121 – always return the century (yyyy) format.
– Microsoft SQL Server T-SQL date and datetime formats
– Date time formats – mssql datetime
– MSSQL getdate returns current system date and time in standard internal format
Please accept with no obligation, implied or implicit, my best wishes for an environmentally conscious, socially responsible, low-stress, non-addictive, gender-neutral celebration of the winter solstice Holiday, practiced within the most enjoyable traditions of the religious persuasion of your choice, or secular practices of your choice, with respect for the religious/secular persuasion and/or traditions of others, or their choice not to practice religious or secular traditions at all. I also wish you a fiscally successful, personally fulfilling and medically uncomplicated recognition of the onset of the generally accepted calendar year 2010, but not without due respect for the calendars of choice of other cultures whose contributions to society have helped make America great. Not to imply that America is necessarily greater than any other country nor the only America in the Western Hemisphere . Also, this wish is made without regard to the race, creed, color, age, physical ability, religious faith or sexual preference of the wish.
So! Firms are starting to hire again, which is very exciting to those of you trying to improve your situation. Perhaps it’s been a while since a lot have gone through this process, and you’re a little rusty on the Do’s and Dont’s. Which why starting today we’ll be offering little pearls of accumulated wisdom picked up in the field. Tip one: don’t lie about having received an offer from one firm while you’re interviewing with another. Tip one-A: if you’re going to lie about said fake offer, impersonate someone and forge a little evidence: easy on the typos. Spelling Bank of America without ‘c’ is going to be a red flag. Jeffrey Chiang knows what we’re talking about.
Chiang apparently interviewed at Bank of America, where he was asked if he had any offers from other firms. Jeffrey claimed that he was in his second round of interviews with Morgan Stanley. An associate at BofA then contacted his friend at Morgan about Jeffrey’s prospects. The Morgan guy said that contrary to popular belief, JC had only had a phone interview, at which time he claimed to have gotten a full-out offer from BofA. As proof, JC provided a fabricated email allegedly from a recruiting woman at Bank of America, who would probably be surprised to be informed she’d offered Chiang a job (and that she didn’t know how to spell “America”). The Morgan people forwarded the faux letter of employment back to the people at Bank of America who were doing recon and from there it was forwarded to the entire free world.
Obviously, the lies here are not good form but what’s most upsetting is the lack of effort. There wasn’t an ounce of creativity or dancing in this scam (though we did appreciate the demand to be put up at the Four Seasons). In fact, it’s downright boring, as scams go. It doesn’t come close to a Vayner move, and yet Mr. Chiang has been relegated to the same status as one of the greats. (A list of firms JC will likely not be getting offers from, as gleaned from the outrage expressed by their employees, can be found below). Apparently, though, we now live in a world of diminished expectations where you don’t even need a video or a claim to bench press 500 lbs to rile people up or swear they’ll never offer you a job. Going forward, you’ve been warned.
From: Jeffrey Chiang
To: [Morgan Stanley]
Subject: FW: Bank of America Merrill Lynch Interviews
From: [Fake Bank of America ML Recruiter]
To: Jeffrey Chiang
Subject RE: Bank of America Merrill Lynch Interviews
Hi Jeff,
Everyone was very impressed with your interviews today. We are excited
to formally extend to you an offer to join Bank of Ameria [sic]
Merrill Lynch as an analyst next summer. You should be getting
documentation in the mail to sign very shortly. If you have any
further questions please feel free to email me. Again, congratulations
and we look forward to having you join us next year.
——————————
From: [Morgan Stanley]
To: [Bank of America ML]
Subject: FW: Bank of America Merrill Lynch Interviews
This is what Jeffrey sent Morgan Stanley to prove he received an offer
from your firm. Given you told me you dinged him, should I assume this
is fake? If so, that’s unbelievable and his school should be notified,
he shouldn’t get a job anywhere on Wall Street.
——————————
From: [Bank of America ML]
To: [Lehman Brothers], [UBS]
Subject: FW: Jeffrey Chiang
I don’t know if this guy has come up on your radar screens in terms of
analyst recruits, but you need to be warned about him. I should have
been tipped off by the fact that he ran a “5k marathon” on his resume.
I just figured something got lost in translation.
I interviewed him on campus, and while he was pretty weird/intense, he
seemed like somebody who would crank and potentially make for a good
analyst, so we waved him in for an office visit.
Things started going bad for him when I got a call from our HR
department about him during our Superday. In making his travel
arrangements with our travel agent, he had apparently made a big stink
about needing to stay at the Four Seasons and blow up on the travel
person. It was apparently bad enough that she went to the trouble to
inform our HR department.
Our Superday reviews on him were pretty mixed, nonetheless. He had
spent a summer at Gulfstar, so I did a bit of checking on him there,
and it became clear that they were also very unimpressed with the way
that he carried himself. So, we dinged him, but that is not where the
story ends.
He had told one of the associates in our office that he was in the
second round of interviews for MS’s Palo Alto office. Well, our
associate happened to mention this to his friend that works in the MS
Palo Alto office and the associate at MS said that Jeff had had only
had a phone interview but had indicated that he had an offer from
BAML. When the MS team asked him to send proof of his offer, he
manufactured the email below and forwarded to the MS team.
We have notified UT of this joker’s behavior, but needless to say,
this guy shouldn’t be able to get a job at McDonalds after a stunt
like this.
So far employees from the following firms have been read into the situation (i.e were forwarded the above); all but one were “shocked” by this “clown” who they believe should “blacklisted.” The exception was a representative of Jefferies, who said that JEF could use a guy like JC.
I’m attempting to summarize what most of us have gone through or will be going through in our path to B-school. I was partially motivated by several other posts within the forum (which I thank for) and partially on self experience (though the characters in this story are fictional, etc., you know the drill). School names are used as examples and by no means I intend to mock any organization or person, this is just an attempt at summarizing, in a humorous way, this rocky personal journey.
i.Introduction
Let’s say you are 2 or 3 years out of college and the thought of an MBA starts lingering in your mind. Either you’ve heard some stories of former colleagues going for it and are curious about it or you think the name sounds cool.
You can talk to MBA alumni (if you have access to them) to start your research, or maybe to some friends. But this initial conversations can be biased (name 1 alumni who “officially” thinks his/her school sucked and you’ll get a bonus!) for all you know.
So you decide you need some “objective data” to continue your research and you go pick up the latest issue of US news/ B-week, or whichever one is available at newsstands. You browse through their pages and start wondering:
1st phase (the MBA honeymoon):
- Wait, wasn’t Kellogg a cereal brand? - What’s with the GMAT scores? why 700? over 1000? that’s weird. What’s GMAT btw? - Ah, finally, I know Yale, I know Harvard, I know Stanford, MIT and UCLA. But where’s Princeton? And Brown? - I like International Business, so as per these rankings I should better be attending Thunderbird. But why are the starting salaries from there so much lower than from other schools? - I loved Miami when I visited on spring break. Lemme see what their school’s like.
2nd phase (Delussional optimism):
- I’m a wise person, so GMAT shouldn’t be a problem for me. Maybe I’ll take one of these intensive 1-week courses and go for it! Why would anybody spend months studying? That doesn’t make any sense. I mean it’s high school level math and English for crying out loud. Heck, I can speak English, I’ve taken Calculus classes.
- I’m a clear admit at HBS, plus I’ll get a full scholarship. After all I’ll get a top GMAT, I do speak four languages and have made steady progress at work so far.
3rd phase (Depression while taming the beast):
- GMAT sucks. My friends no longer talk to me. My girlfriend broke up with me and spending 150k for an MBA doesn’t make much sense to me anymore (nor does it make sense to my family, my former friends nor my girlfriend). Do I really, really want to do this? Otherwise I could go back to having a life right now.
- Ok, so I’m headed for a 600 score, if I’m lucky. Let’s see what that would do for me. Hmm, I’d better score at least 650. Wait, 650 ain’t that bad! Oh boy, I’d kill for a 650.
- “So Johnny (an acquaintance of yours), how did your GMAT go?” Johnny: “Oh man, I’m so depressed. I bombed my 7th attempt. I just can’t get past 550. I’m about giving up” You: “Crap, Johnny, after all the effort you’ve put into this, I can’t believe what you are telling me. I mean, I’m still a zillion hours away from your study record to date. By the way, I’ll better be heading home and attack those SCs again!”
- (at 4am in the morning on a working day): I suck, I suck, I suck! I can’t believe the silly mistakes I’m making. Sigh, I wish I’d remember more about Statistics…
4th phase (post GMAT preliminary research)
- Ok, so I got a pretty decent GMAT. Now let me write sth and send my app right away so we can finally bring this “I’ll pretend I read your app.” game to an end. Let’s check the instructions.
1st question) What matters most to you an why? [3 to 5 pages] Hmm. Maybe I’ll leave this one for tomorrow. Or let me brainstorm and write a shortlist:
1st shortlist (prior to any research): a) Money. b) Success. c) Beer. d) Getting my ticket stamped to land an IB job.
2nd shortlist (after some research): a) Being mother Theresa. b) Saving humanity. c) Saving the environment. d) “Changing the world”.
- I’ll apply to 147 schools. That way, I’d maximize my chances of getting a scholarship.
- What’s with the letter of recommendation? Should I tell my boss about my plans? It looks like the point of no return to me.
5th phase (applying, AKA the emotional roller-coaster)
[staring at essay#1 version # 84]: This sucks! I can’t believe how boring I sound. I should re-start from scratch!
- I should write about the snooker tournament I won when I was 16. That’d be original, plus I can spin it to show how I used my leadership, analytical and teamwork skills.
- Beh, I can apply in Round 2 as well.
- Crap! my recommenders haven’t even accessed the website yet and it’s only 2 days left! I’ll send them “friendly reminder #27″. No, wait, I sent #26 just 5 minutes ago. Maybe I’ll wait another half hour.
- Wait, was Kellogg’s deadline on the 5th? Or was that MIT? Maybe I should drop Wharton. I can’t make deadlines on the 3rd, 4th, 5th and 7th. OK, I’ll just drop Wharton from my list and have it as “fresh” backup for next year just in case.
- I wish I had applied to more schools in Round 1. Look at all these people getting interviews and admits!
6th phase (post application blues)
- Shoot, I won’t get in anywhere. I mean look at the profiles of applicants! I should retake GMAT. My 700 is not enough. I should aim for 790+.
- Crap! Yale dinged me without interview! Ohmigod! If they did it, ANYONE can do it! THEY COULD ALL DO IT!
- I have an idea! I’ll check which schools have rolling admissions and apply to those. I still have time!
- Suddenly University of Phoenix Online doesn’t sound that bad.
- Why? Why? Why didn’t apply to more backups? Why did I have to shake my interviewer’s hand so firmly? Why didn’t I coach my recommenders more thoroughly? I wonder what they’ve written. Probably nothing good. I wish I had submitted my app. a day earlier, that way I would have looked as a well organized person. I read that Kellogg dings all applicants above 28 years old who haven’t made directors positions. Wait, is that a typo on my MIT essays? That’s one school less, buddy. I’m soo doomed.
7th phase (endless joy)
- Hell yeah! I’ve made it! I’ve been admitted [dream school X] next year! I rule! I can’t wait to get recruited by [dream employer]. When is admitted students weekend?
- 2nd admit! I rule!
- Should I go to [School X] with a 7k scholarship or to [School Y] with a 25 k scholarship?
- Work? What’s work? Ah, right, that thing I’m supposed to be doing daily on weekdays from 9 to 5…
- I wonder whether spending this 150k makes sense after all…
- I’m so gonna get grilled at B-school! What if I mess up? I’d better start brushing up on some skills.
Hope you enjoy, and feel free to propose edits or add-ons. After all, we’re all together in this journey!