Title: If-exists and Schema tricks-SQL Server
Duration: 15 minutes
Summary: In this video, I am discussing couple of tricks that you need when writing sql code. First, I am going to discuss if-exists. When writing scripts, your code might be run multiple times. In order to avoid errors, you need to wrap your insert statements with if-exists. Second, information_schema is important because it contains very helpful information about the tables, columns… In this case, I am going to show you how you can use the information _schema to look for tables and columns in a large database that will save you minutes and even hours of searching! Finally, I will show you how you can search for stored procedures that match a certain name in a database.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: SQL Server 2008.
Keywords: select, if-exists, insert, table_name, column_name, information_schema, is_nullable, stored procedures, routine, routine_name, routine_definition.