Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged table



« Prev 1 Next »
clone table with structure and indexes
0 764 posted 8 years ago by ktrout
Confirm the sql script file is encoded with `UTF-8`
0 788 posted 9 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 859 posted 11 years ago by denakitan
The inner join could be nested too
0 734 posted 12 years ago by preasha
My Drop Column.sql This template drops a columns of the table.
0 471 posted 13 years ago by edwinet
My Add Column Varchar.sql This template adds a new varchar column to the table.
0 544 posted 13 years ago by edwinet
Get table schema with columns via sql.
0 534 posted 13 years ago by djmornyc
Backup a single table from a database
0 582 posted 13 years ago by tribal
Verify whether temporary table created is exists or not
1 564 posted 13 years ago by hairajeshk
1 454 posted 13 years ago by RealRover
1 591 posted 14 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 921 posted 14 years ago by highlyevolved
This will return a list of all the tables in a certain database along with their row count.
1 708 posted 14 years ago by blackf0rk
0 576 posted 15 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 820 posted 15 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 2596 posted 15 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 1334 posted 15 years ago by cbrant
« Prev 1 Next »