title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
Tuesday, November 24, 2015 | |
You can find 'em here: https://msdn.microsoft.com/en-us/library/ms190324.aspx Or read 'em from that page here: type char(2) Object type: Applies to: SQL Server 2012 through SQL Server 2016. So to check if a table exists (from here): IF OBJECT_ID('TableName', 'U') IS NOT NULL
DROP TABLE TableName;
Voila. QED. Or something like that. And just to complete what I was fiddling with today, here's how to create the two different types of ids, autoincrementing INT (or other INT type) and GUIDs: TableId [uniqueidentifier] CONSTRAINT DF_SerialID DEFAULT newsequentialid(), -- GUID, natch ... or... TableId INT IDENTITY(1,1), -- INTige Labels: noteToSelf, SQL, SQL Server, t-sql posted by ruffin at 11/24/2015 09:03:00 AM |
|
| |
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
![]() |
|
|