Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged table



« Prev 1 Next »
clone table with structure and indexes
0 2904 posted 10 years ago by ktrout
Confirm the sql script file is encoded with `UTF-8`
0 1929 posted 11 years ago by jacktan
Example of SQL syntax to add a new column to an existing table, define a default value to the columns for the existing rows and also add a check constraint to limit the values that the column can hold.
0 2932 posted 14 years ago by denakitan
The inner join could be nested too
0 1925 posted 14 years ago by preasha
My Drop Column.sql This template drops a columns of the table.
0 1315 posted 15 years ago by edwinet
My Add Column Varchar.sql This template adds a new varchar column to the table.
0 1449 posted 15 years ago by edwinet
Get table schema with columns via sql.
0 1457 posted 15 years ago by djmornyc
Backup a single table from a database
0 1488 posted 15 years ago by tribal
Verify whether temporary table created is exists or not
1 1753 posted 15 years ago by hairajeshk
1 1581 posted 15 years ago by RealRover
1 1864 posted 16 years ago by CDIDevs
A Temp table is great for combining multiple SELECT statements in a Sproc and outputting as just one table. Don't forget to Drop the table after the SELECT * FROM #TempTableName at the end.
2 2191 posted 16 years ago by highlyevolved
This will return a list of all the tables in a certain database along with their row count.
1 1746 posted 17 years ago by blackf0rk
0 1546 posted 17 years ago by smoover
Fields are tab delimited and need to match table schema. I've found the tab separator ASCII(009) preferable over using a comma. The second version can help remove double quotation marks around character fields. Don't forget the keyword LOC...
0 2024 posted 17 years ago by RICHARDP
This will create and then populate a MySQL table with a list of the names and USPS abbreviations for US states and possessions in existence.
3 4365 posted 17 years ago by cbrant
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5 3726 posted 17 years ago by cbrant
« Prev 1 Next »